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.
infer_variance
__mypy-replace
1 parent aec6a87 commit d8c7c3eCopy full SHA for d8c7c3e
mypy/subtypes.py
@@ -2056,9 +2056,10 @@ def infer_variance(info: TypeInfo, i: int) -> bool:
2056
tvar = info.defn.type_vars[i]
2057
self_type = fill_typevars(info)
2058
for member in all_non_object_members(info):
2059
- # __mypy-replace is an implementation detail of the dataclass plugin
2060
- if member in ("__init__", "__new__", "__mypy-replace"):
+ if member in ("__init__", "__new__"):
2061
continue
+ if "mypy-" in member:
2062
+ continue # skip internally added methods
2063
2064
if isinstance(self_type, TupleType):
2065
self_type = mypy.typeops.tuple_fallback(self_type)
0 commit comments