Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,12 +1,12 @@
import sys
from typing import Callable, List, Optional, Sequence, Text, Union
from typing import Callable, List, Sequence, Text
class Error(Exception): ...
def register(
name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: Optional[BaseBrowser] = ..., update_tryorder: int = ...
name: Text, klass: Callable[[], BaseBrowser] | None, instance: BaseBrowser | None = ..., update_tryorder: int = ...
) -> None: ...
def get(using: Optional[Text] = ...) -> BaseBrowser: ...
def get(using: Text | None = ...) -> BaseBrowser: ...
def open(url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
def open_new(url: Text) -> bool: ...
def open_new_tab(url: Text) -> bool: ...
@@ -24,14 +24,14 @@ class GenericBrowser(BaseBrowser):
args: List[str]
name: str
basename: str
def __init__(self, name: Union[Text, Sequence[Text]]) -> None: ...
def __init__(self, name: Text | Sequence[Text]) -> None: ...
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
class BackgroundBrowser(GenericBrowser):
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
class UnixBrowser(BaseBrowser):
raise_opts: Optional[List[str]]
raise_opts: List[str] | None
background: bool
redirect_stdout: bool
remote_args: List[str]