mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Convert namedtuples to class syntax (#3321)
This commit is contained in:
@@ -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 = ...,
|
||||
|
||||
Reference in New Issue
Block a user