Skip to content

Commit

Permalink
Fix false-positives appearing when cache is in use
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Sep 27, 2022
1 parent 5139181 commit 235ae02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mypy_zope/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ def _apply_interface(self, impl: TypeInfo, iface: TypeInfo) -> None:
# there is a decorator for the class that will create a "type promotion",
# but ensure this only gets applied a single time per interface.
promote = Instance(iface, [])
if not any(ti._promote == promote for ti in impl.mro):
if not any(promote in ti._promote for ti in impl.mro):
faketi = TypeInfo(SymbolTable(), iface.defn, iface.module_name)
faketi._promote = [promote]
impl.mro.append(faketi)
Expand Down

0 comments on commit 235ae02

Please sign in to comment.