mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 19:32:13 +08:00
Replace 'Text' with 'str' in py3 stdlib (#5466)
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
import sys
|
||||
from typing import Callable, List, Optional, Sequence, Text, Union
|
||||
from typing import Callable, List, Optional, Sequence, Union
|
||||
|
||||
class Error(Exception): ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def register(
|
||||
name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: Optional[BaseBrowser] = ..., *, preferred: bool = ...
|
||||
name: str, klass: Optional[Callable[[], BaseBrowser]], instance: Optional[BaseBrowser] = ..., *, preferred: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
else:
|
||||
def register(
|
||||
name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: Optional[BaseBrowser] = ..., update_tryorder: int = ...
|
||||
name: str, klass: Optional[Callable[[], BaseBrowser]], instance: Optional[BaseBrowser] = ..., update_tryorder: int = ...
|
||||
) -> None: ...
|
||||
|
||||
def get(using: Optional[Text] = ...) -> BaseBrowser: ...
|
||||
def open(url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open_new(url: Text) -> bool: ...
|
||||
def open_new_tab(url: Text) -> bool: ...
|
||||
def get(using: Optional[str] = ...) -> BaseBrowser: ...
|
||||
def open(url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open_new(url: str) -> bool: ...
|
||||
def open_new_tab(url: str) -> bool: ...
|
||||
|
||||
class BaseBrowser:
|
||||
args: List[str]
|
||||
name: str
|
||||
basename: str
|
||||
def __init__(self, name: Text = ...) -> None: ...
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open_new(self, url: Text) -> bool: ...
|
||||
def open_new_tab(self, url: Text) -> bool: ...
|
||||
def __init__(self, name: str = ...) -> None: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open_new(self, url: str) -> bool: ...
|
||||
def open_new_tab(self, url: str) -> bool: ...
|
||||
|
||||
class GenericBrowser(BaseBrowser):
|
||||
args: List[str]
|
||||
name: str
|
||||
basename: str
|
||||
def __init__(self, name: Union[Text, Sequence[Text]]) -> None: ...
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def __init__(self, name: Union[str, Sequence[str]]) -> None: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
class BackgroundBrowser(GenericBrowser):
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
class UnixBrowser(BaseBrowser):
|
||||
raise_opts: Optional[List[str]]
|
||||
@@ -45,7 +45,7 @@ class UnixBrowser(BaseBrowser):
|
||||
remote_action: str
|
||||
remote_action_newwin: str
|
||||
remote_action_newtab: str
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
class Mozilla(UnixBrowser):
|
||||
remote_args: List[str]
|
||||
@@ -84,20 +84,20 @@ class Elinks(UnixBrowser):
|
||||
redirect_stdout: bool
|
||||
|
||||
class Konqueror(BaseBrowser):
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
class Grail(BaseBrowser):
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
class WindowsDefault(BaseBrowser):
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
if sys.platform == "darwin":
|
||||
class MacOSX(BaseBrowser):
|
||||
name: str
|
||||
def __init__(self, name: Text) -> None: ...
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def __init__(self, name: str) -> None: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
class MacOSXOSAScript(BaseBrowser):
|
||||
def __init__(self, name: Text) -> None: ...
|
||||
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
def __init__(self, name: str) -> None: ...
|
||||
def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user