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,4 +1,3 @@
|
||||
import sys
|
||||
from types import ModuleType, TracebackType
|
||||
from typing import Any, List, Optional, TextIO, Type, Union, overload
|
||||
from typing_extensions import Literal
|
||||
@@ -31,28 +30,17 @@ class WarningMessage:
|
||||
lineno: int
|
||||
file: Optional[TextIO]
|
||||
line: Optional[str]
|
||||
if sys.version_info >= (3, 6):
|
||||
source: Optional[Any]
|
||||
def __init__(
|
||||
self,
|
||||
message: Union[Warning, str],
|
||||
category: Type[Warning],
|
||||
filename: str,
|
||||
lineno: int,
|
||||
file: Optional[TextIO] = ...,
|
||||
line: Optional[str] = ...,
|
||||
source: Optional[Any] = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
message: Union[Warning, str],
|
||||
category: Type[Warning],
|
||||
filename: str,
|
||||
lineno: int,
|
||||
file: Optional[TextIO] = ...,
|
||||
line: Optional[str] = ...,
|
||||
) -> None: ...
|
||||
source: Optional[Any]
|
||||
def __init__(
|
||||
self,
|
||||
message: Union[Warning, str],
|
||||
category: Type[Warning],
|
||||
filename: str,
|
||||
lineno: int,
|
||||
file: Optional[TextIO] = ...,
|
||||
line: Optional[str] = ...,
|
||||
source: Optional[Any] = ...,
|
||||
) -> None: ...
|
||||
|
||||
class catch_warnings:
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user