From 364bb3f9e05cd7e3f1a5d93db1b636f9aa7fab2a Mon Sep 17 00:00:00 2001 From: g1879 Date: Fri, 22 Dec 2023 22:01:30 +0800 Subject: [PATCH] 4.0.0b27 --- DrissionPage/__init__.py | 2 +- DrissionPage/_elements/chromium_element.pyi | 8 +++++--- DrissionPage/_units/listener.pyi | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/DrissionPage/__init__.py b/DrissionPage/__init__.py index f631dfe..ee8436a 100644 --- a/DrissionPage/__init__.py +++ b/DrissionPage/__init__.py @@ -13,4 +13,4 @@ from ._configs.chromium_options import ChromiumOptions from ._configs.session_options import SessionOptions __all__ = ['ChromiumPage', 'ChromiumOptions', 'SessionOptions', 'SessionPage', 'WebPage', '__version__'] -__version__ = '4.0.0b26' +__version__ = '4.0.0b27' diff --git a/DrissionPage/_elements/chromium_element.pyi b/DrissionPage/_elements/chromium_element.pyi index f006917..b381132 100644 --- a/DrissionPage/_elements/chromium_element.pyi +++ b/DrissionPage/_elements/chromium_element.pyi @@ -12,6 +12,7 @@ from .._elements.session_element import SessionElement from .._pages.chromium_base import ChromiumBase from .._pages.chromium_frame import ChromiumFrame from .._pages.chromium_page import ChromiumPage +from .._pages.chromium_tab import ChromiumTab from .._pages.web_page import WebPage from .._units.clicker import Clicker from .._units.rect import ElementRect @@ -314,11 +315,12 @@ def find_by_css(ele: ChromiumElement, selector: str, single: bool, timeout: float) -> Union[ChromiumElement, List[ChromiumElement], NoneElement]: ... -def make_chromium_ele(page: ChromiumBase, node_id: int = ..., obj_id: str = ...) \ - -> Union[ChromiumElement, ChromiumFrame, str]: ... +def make_chromium_ele(page: Union[ChromiumPage, WebPage, ChromiumTab, ChromiumFrame], + node_id: int = ..., + obj_id: str = ...) -> Union[ChromiumElement, ChromiumFrame, str]: ... -def make_chromium_eles(page: ChromiumBase, +def make_chromium_eles(page: Union[ChromiumPage, WebPage, ChromiumTab, ChromiumFrame], node_ids: Union[tuple, list] = None, obj_ids: Union[tuple, list] = None, single: bool = True, diff --git a/DrissionPage/_units/listener.pyi b/DrissionPage/_units/listener.pyi index c281c68..dccb3ec 100644 --- a/DrissionPage/_units/listener.pyi +++ b/DrissionPage/_units/listener.pyi @@ -199,7 +199,7 @@ class Response(object): def raw_body(self) -> str: ... @property - def body(self) -> Union[str, dict, bool]: ... + def body(self) -> Union[str, dict]: ... class ExtraInfo(object): diff --git a/setup.py b/setup.py index 82bafe4..a21ad1c 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open("README.md", "r", encoding='utf-8') as fh: setup( name="DrissionPage", - version="4.0.0b26", + version="4.0.0b27", author="g1879", author_email="g1879@qq.com", description="Python based web automation tool. It can control the browser and send and receive data packets.",