mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +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 sre_constants import (
|
||||
SRE_FLAG_ASCII as SRE_FLAG_ASCII,
|
||||
SRE_FLAG_DEBUG as SRE_FLAG_DEBUG,
|
||||
SRE_FLAG_DOTALL as SRE_FLAG_DOTALL,
|
||||
SRE_FLAG_IGNORECASE as SRE_FLAG_IGNORECASE,
|
||||
@@ -11,21 +11,16 @@ from sre_constants import (
|
||||
SRE_INFO_CHARSET as SRE_INFO_CHARSET,
|
||||
SRE_INFO_LITERAL as SRE_INFO_LITERAL,
|
||||
SRE_INFO_PREFIX as SRE_INFO_PREFIX,
|
||||
_NamedIntConstant,
|
||||
)
|
||||
from sre_parse import SubPattern
|
||||
from typing import Any, List, Pattern, Tuple, Type, Union
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
from sre_constants import SRE_FLAG_ASCII as SRE_FLAG_ASCII
|
||||
from typing import Any, List, Pattern, Union
|
||||
|
||||
MAXCODE: int
|
||||
if sys.version_info < (3, 0):
|
||||
STRING_TYPES: Tuple[Type[str], Type[unicode]]
|
||||
_IsStringType = int
|
||||
else:
|
||||
from sre_constants import _NamedIntConstant
|
||||
def dis(code: List[_NamedIntConstant]) -> None: ...
|
||||
_IsStringType = bool
|
||||
|
||||
def dis(code: List[_NamedIntConstant]) -> None: ...
|
||||
|
||||
_IsStringType = bool
|
||||
|
||||
def isstring(obj: Any) -> _IsStringType: ...
|
||||
def compile(p: Union[str, bytes, SubPattern], flags: int = ...) -> Pattern[Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user