Skip to content

Commit fa2e72b

Browse files
try out a fix for this common code, that i will probably remove later as a special case
1 parent 14e165d commit fa2e72b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypy/plugins/proper_plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from typing import Callable
1313

1414
from mypy.checker import TypeChecker
15+
from mypy.errorcodes import MISC
1516
from mypy.nodes import TypeInfo
1617
from mypy.plugin import FunctionContext, Plugin
1718
from mypy.subtypes import is_proper_subtype
@@ -72,6 +73,7 @@ def isinstance_proper_hook(ctx: FunctionContext) -> Type:
7273
"If you pass on the original type"
7374
" after the check, always use its unexpanded version",
7475
ctx.context,
76+
code=MISC,
7577
)
7678
return ctx.default_return_type
7779

0 commit comments

Comments
 (0)