Convert namedtuples to class syntax (#3321)

This commit is contained in:
Sebastian Rittau
2019-10-20 10:37:33 +02:00
committed by GitHub
parent 2b9dc7b9c2
commit ec7960a8cb
41 changed files with 397 additions and 383 deletions

View File

@@ -29,13 +29,13 @@ def simplefilter(action: str, category: Type[Warning] = ..., lineno: int = ...,
append: bool = ...) -> None: ...
def resetwarnings() -> None: ...
_Record = NamedTuple('_Record',
[('message', str),
('category', Type[Warning]),
('filename', str),
('lineno', int),
('file', Optional[TextIO]),
('line', Optional[str])])
class _Record(NamedTuple):
message: str
category: Type[Warning]
filename: str
lineno: int
file: Optional[TextIO]
line: Optional[str]
class catch_warnings:
def __init__(self, *, record: bool = ...,