mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Big diff: use lower-case list and dict (#5888)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from types import ModuleType, TracebackType
|
||||
from typing import Any, List, TextIO, Type, overload
|
||||
from typing import Any, TextIO, Type, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
from _warnings import warn as warn, warn_explicit as warn_explicit
|
||||
@@ -42,7 +42,7 @@ class catch_warnings:
|
||||
def __new__(cls, *, record: Literal[True], module: ModuleType | None = ...) -> _catch_warnings_with_records: ...
|
||||
@overload
|
||||
def __new__(cls, *, record: bool, module: ModuleType | None = ...) -> catch_warnings: ...
|
||||
def __enter__(self) -> List[WarningMessage] | None: ...
|
||||
def __enter__(self) -> list[WarningMessage] | None: ...
|
||||
def __exit__(
|
||||
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@@ -51,4 +51,4 @@ class _catch_warnings_without_records(catch_warnings):
|
||||
def __enter__(self) -> None: ...
|
||||
|
||||
class _catch_warnings_with_records(catch_warnings):
|
||||
def __enter__(self) -> List[WarningMessage]: ...
|
||||
def __enter__(self) -> list[WarningMessage]: ...
|
||||
|
||||
Reference in New Issue
Block a user