mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user