We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
int | Any
types.FrameType.f_lineno
1 parent bb1fda3 commit eca4c30Copy full SHA for eca4c30
mypy/typeshed/stdlib/types.pyi
@@ -354,7 +354,10 @@ class FrameType:
354
f_code: CodeType
355
f_globals: dict[str, Any]
356
f_lasti: int
357
- f_lineno: int | None
+ # see discussion in #6769: f_lineno *can* sometimes be None,
358
+ # but you should probably file a bug report with CPython if you encounter it being None in the wild.
359
+ # An `int | None` annotation here causes too many false-positive errors.
360
+ f_lineno: int | Any
361
f_locals: dict[str, Any]
362
f_trace: Callable[[FrameType, str, Any], Any] | None
363
if sys.version_info >= (3, 7):
0 commit comments