Skip to content

Commit

Permalink
reuse _selector_input
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed May 28, 2023
1 parent 4baedce commit ad6f77e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions web_poet/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ def selector(self) -> parsel.Selector:
class UrlShortcutsMixin:
_cached_base_url = None

@abc.abstractmethod
def _url_shortcuts_input(self) -> str:
raise NotImplementedError() # pragma: nocover
return self._selector_input() # type: ignore[attr-defined]

@property
def _base_url(self) -> str:
Expand Down Expand Up @@ -105,9 +104,6 @@ def html(self):
def _selector_input(self) -> str:
return self.html

def _url_shortcuts_input(self) -> str:
return self.html

@property
def base_url(self) -> str:
"""Return the base url of the given response"""
Expand Down
3 changes: 0 additions & 3 deletions web_poet/page_inputs/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,6 @@ def text(self) -> str:
def _selector_input(self) -> str:
return self.text

def _url_shortcuts_input(self) -> str:
return self.text

@property
def encoding(self) -> Optional[str]:
"""Encoding of the response"""
Expand Down

0 comments on commit ad6f77e

Please sign in to comment.