8000
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.
__mypy-replace
1 parent 373b73a commit 2ff7c0dCopy full SHA for 2ff7c0d
mypy/stubtest.py
@@ -496,7 +496,11 @@ def verify_typeinfo(
496
)
497
498
# Check everything already defined on the stub class itself (i.e. not inherited)
499
- to_check = set(stub.names)
+ #
500
+ # Filter out non-identifier names, as these are (hopefully always?) whacky/fictional things
501
+ # (like __mypy-replace or __mypy-post_init, etc.) that don't exist at runtime,
502
+ # and exist purely for internal mypy reasons
503
+ to_check = {name for name in stub.names if name.isidentifier()}
504
# Check all public things on the runtime class
505
to_check.update(
506
m for m in vars(runtime) if not is_probably_private(m) and m not in IGNORABLE_CLASS_DUNDERS
0 commit comments