mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli) * do the whole thing manually (srittau) * merge changes (Akuli) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import SupportsWrite
|
||||
from reprlib import Repr
|
||||
from types import MethodType, ModuleType, TracebackType
|
||||
from typing import (
|
||||
IO,
|
||||
@@ -19,11 +19,6 @@ from typing import (
|
||||
Union,
|
||||
)
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
from reprlib import Repr
|
||||
else:
|
||||
from repr import Repr
|
||||
|
||||
# the return type of sys.exc_info(), used by ErrorDuringImport.__init__
|
||||
_Exc_Info = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
|
||||
|
||||
@@ -265,9 +260,3 @@ class ModuleScanner:
|
||||
def apropos(key: str) -> None: ...
|
||||
def ispath(x: Any) -> bool: ...
|
||||
def cli() -> None: ...
|
||||
|
||||
if sys.version_info < (3,):
|
||||
def serve(
|
||||
port: int, callback: Optional[Callable[[Any], None]] = ..., completer: Optional[Callable[[], None]] = ...
|
||||
) -> None: ...
|
||||
def gui() -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user