4.1.0.0b24find()的any_one参数默认为True;优化注释

This commit is contained in:
g1879 2024-09-14 17:23:38 +08:00
parent 78d3b90653
commit 828262f6a1
4 changed files with 5 additions and 5 deletions

View File

@ -12,4 +12,4 @@ from ._pages.chromium_page import ChromiumPage
from ._pages.session_page import SessionPage from ._pages.session_page import SessionPage
from ._pages.web_page import WebPage from ._pages.web_page import WebPage
__version__ = '4.1.0.0b24' __version__ = '4.1.0.0'

View File

@ -35,7 +35,7 @@ class BaseParser(object):
def eles(self, locator, timeout=None): def eles(self, locator, timeout=None):
return self._ele(locator, timeout, index=None) return self._ele(locator, timeout, index=None)
def find(self, locators, any_one=False, first_ele=True, timeout=None): def find(self, locators, any_one=True, first_ele=True, timeout=None):
if 'Session' in self._type: if 'Session' in self._type:
timeout = 0 timeout = 0
if timeout is None: if timeout is None:

View File

@ -38,7 +38,7 @@ class BaseParser(object):
def find(self, def find(self,
locators: Union[str, List[str], tuple], locators: Union[str, List[str], tuple],
any_one: bool = False, any_one: bool = True,
first_ele: bool = True, first_ele: bool = True,
timeout: float = None) -> Union[Dict[str, ChromiumElement], Dict[str, SessionElement], timeout: float = None) -> Union[Dict[str, ChromiumElement], Dict[str, SessionElement],
Dict[str, List[ChromiumElement]], Dict[str, List[SessionElement]]]: Dict[str, List[ChromiumElement]], Dict[str, List[SessionElement]]]:

View File

@ -29,7 +29,7 @@ class SessionElementsList(list):
def __next__(self) -> SessionElement: ... def __next__(self) -> SessionElement: ...
def __getitem__(self, _i) -> SessionElement: ... def __getitem__(self, _i) -> Union[SessionElement, List[SessionElement]]: ...
@property @property
def get(self) -> Getter: def get(self) -> Getter:
@ -61,7 +61,7 @@ class ChromiumElementsList(SessionElementsList):
def __next__(self) -> ChromiumElement: ... def __next__(self) -> ChromiumElement: ...
def __getitem__(self, _i) -> ChromiumElement: ... def __getitem__(self, _i) -> Union[ChromiumElement, List[ChromiumElement]]: ...
@property @property
def filter(self) -> ChromiumFilter: def filter(self) -> ChromiumFilter: