mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use MaybeNone (alias to Any) when applicable (#12855)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import SupportsKeysAndGetItem
|
||||
from _typeshed import MaybeNone, SupportsKeysAndGetItem
|
||||
from _typeshed.importlib import LoaderProtocol
|
||||
from collections.abc import (
|
||||
AsyncGenerator,
|
||||
@@ -528,9 +528,9 @@ class FrameType:
|
||||
def f_lasti(self) -> int: ...
|
||||
# see discussion in #6769: f_lineno *can* sometimes be None,
|
||||
# but you should probably file a bug report with CPython if you encounter it being None in the wild.
|
||||
# An `int | None` annotation here causes too many false-positive errors.
|
||||
# An `int | None` annotation here causes too many false-positive errors, so applying `int | Any`.
|
||||
@property
|
||||
def f_lineno(self) -> int | Any: ...
|
||||
def f_lineno(self) -> int | MaybeNone: ...
|
||||
@property
|
||||
def f_locals(self) -> dict[str, Any]: ...
|
||||
f_trace: Callable[[FrameType, str, Any], Any] | None
|
||||
|
||||
Reference in New Issue
Block a user