massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / webbrowser.pyi
1 import sys
2 from typing import Callable, Sequence
3
4 class Error(Exception): ...
5
6 if sys.version_info >= (3, 7):
7     def register(
8         name: str, klass: Callable[[], BaseBrowser] | None, instance: BaseBrowser | None = ..., *, preferred: bool = ...
9     ) -> None: ...
10
11 else:
12     def register(
13         name: str, klass: Callable[[], BaseBrowser] | None, instance: BaseBrowser | None = ..., update_tryorder: int = ...
14     ) -> None: ...
15
16 def get(using: str | None = ...) -> BaseBrowser: ...
17 def open(url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
18 def open_new(url: str) -> bool: ...
19 def open_new_tab(url: str) -> bool: ...
20
21 class BaseBrowser:
22     args: list[str]
23     name: str
24     basename: str
25     def __init__(self, name: str = ...) -> None: ...
26     def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
27     def open_new(self, url: str) -> bool: ...
28     def open_new_tab(self, url: str) -> bool: ...
29
30 class GenericBrowser(BaseBrowser):
31     args: list[str]
32     name: str
33     basename: str
34     def __init__(self, name: str | Sequence[str]) -> None: ...
35     def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
36
37 class BackgroundBrowser(GenericBrowser):
38     def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
39
40 class UnixBrowser(BaseBrowser):
41     raise_opts: list[str] | None
42     background: bool
43     redirect_stdout: bool
44     remote_args: list[str]
45     remote_action: str
46     remote_action_newwin: str
47     remote_action_newtab: str
48     def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
49
50 class Mozilla(UnixBrowser):
51     remote_args: list[str]
52     remote_action: str
53     remote_action_newwin: str
54     remote_action_newtab: str
55     background: bool
56
57 class Galeon(UnixBrowser):
58     raise_opts: list[str]
59     remote_args: list[str]
60     remote_action: str
61     remote_action_newwin: str
62     background: bool
63
64 class Chrome(UnixBrowser):
65     remote_args: list[str]
66     remote_action: str
67     remote_action_newwin: str
68     remote_action_newtab: str
69     background: bool
70
71 class Opera(UnixBrowser):
72     remote_args: list[str]
73     remote_action: str
74     remote_action_newwin: str
75     remote_action_newtab: str
76     background: bool
77
78 class Elinks(UnixBrowser):
79     remote_args: list[str]
80     remote_action: str
81     remote_action_newwin: str
82     remote_action_newtab: str
83     background: bool
84     redirect_stdout: bool
85
86 class Konqueror(BaseBrowser):
87     def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
88
89 class Grail(BaseBrowser):
90     def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
91
92 if sys.platform == "win32":
93     class WindowsDefault(BaseBrowser):
94         def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
95
96 if sys.platform == "darwin":
97     class MacOSX(BaseBrowser):
98         name: str
99         def __init__(self, name: str) -> None: ...
100         def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...
101     class MacOSXOSAScript(BaseBrowser):
102         def __init__(self, name: str) -> None: ...
103         def open(self, url: str, new: int = ..., autoraise: bool = ...) -> bool: ...