Update signature of webbrowser.register for Python 3.7 (#2865)

This commit is contained in:
Cary Yang
2019-03-14 09:29:17 -07:00
committed by Jelle Zijlstra
parent 26fefcc704
commit 66bdf523ff

View File

@@ -3,7 +3,10 @@ from typing import Any, Optional, Callable, List, Text, Union, Sequence
class Error(Exception): ...
def register(name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: BaseBrowser = ..., update_tryorder: int = ...) -> None: ...
if sys.version_info >= (3, 7):
def register(name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: BaseBrowser = ..., *, preferred: bool = ...) -> None: ...
else:
def register(name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: 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: ...