We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
int | Any
types.FrameType.f_lineno
1 parent 01f3f8a commit 1eadf1aCopy full SHA for 1eadf1a
stdlib/types.pyi
@@ -346,7 +346,10 @@ class FrameType:
346
f_code: CodeType
347
f_globals: dict[str, Any]
348
f_lasti: int
349
- f_lineno: int | None
+ # see discussion in #6769: f_lineno *can* sometimes be None,
350
+ # but you should probably file a bug report with CPython if you encounter it being None in the wild.
351
+ # An `int | None` annotation here causes too many false-positive errors.
352
+ f_lineno: int | Any
353
f_locals: dict[str, Any]
354
f_trace: Callable[[FrameType, str, Any], Any] | None
355
if sys.version_info >= (3, 7):
0 commit comments