Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)

This commit is contained in:
Alex Waygood
2022-01-18 15:14:03 +00:00
committed by GitHub
parent aa885ecd65
commit 8af5e0d340
264 changed files with 2217 additions and 2411 deletions

View File

@@ -1,5 +1,5 @@
import sys
from typing import Callable, List, Sequence, Text
from typing import Callable, Sequence, Text
class Error(Exception): ...
@@ -12,7 +12,7 @@ def open_new(url: Text) -> bool: ...
def open_new_tab(url: Text) -> bool: ...
class BaseBrowser:
args: List[str]
args: list[str]
name: str
basename: str
def __init__(self, name: Text = ...) -> None: ...
@@ -21,7 +21,7 @@ class BaseBrowser:
def open_new_tab(self, url: Text) -> bool: ...
class GenericBrowser(BaseBrowser):
args: List[str]
args: list[str]
name: str
basename: str
def __init__(self, name: Text | Sequence[Text]) -> None: ...
@@ -31,45 +31,45 @@ class BackgroundBrowser(GenericBrowser):
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
class UnixBrowser(BaseBrowser):
raise_opts: List[str] | None
raise_opts: list[str] | None
background: bool
redirect_stdout: bool
remote_args: List[str]
remote_args: list[str]
remote_action: str
remote_action_newwin: str
remote_action_newtab: str
def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ...
class Mozilla(UnixBrowser):
remote_args: List[str]
remote_args: list[str]
remote_action: str
remote_action_newwin: str
remote_action_newtab: str
background: bool
class Galeon(UnixBrowser):
raise_opts: List[str]
remote_args: List[str]
raise_opts: list[str]
remote_args: list[str]
remote_action: str
remote_action_newwin: str
background: bool
class Chrome(UnixBrowser):
remote_args: List[str]
remote_args: list[str]
remote_action: str
remote_action_newwin: str
remote_action_newtab: str
background: bool
class Opera(UnixBrowser):
remote_args: List[str]
remote_args: list[str]
remote_action: str
remote_action_newwin: str
remote_action_newtab: str
background: bool
class Elinks(UnixBrowser):
remote_args: List[str]
remote_args: list[str]
remote_action: str
remote_action_newwin: str
remote_action_newtab: str