Skip to content

Commit 6149640

Browse files
committed
fix linting errors
1 parent fb07856 commit 6149640

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mypy/plugins/dataclasses.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
add_method, _get_decorator_bool_argument, deserialize_and_fixup_type,
1414
)
1515
from mypy.typeops import map_type_from_supertype
16-
from mypy.types import Type, Instance, NoneType, TypeVarDef, TypeVarType, CallableType, get_proper_type
16+
from mypy.types import (
17+
Type, Instance, NoneType, TypeVarDef, TypeVarType, CallableType,
18+
get_proper_type
19+
)
1720
from mypy.server.trigger import make_wildcard_trigger
1821

1922
# The set of decorators that generate dataclasses.
@@ -365,7 +368,7 @@ def _propertize_callables(self, attributes: List[DataclassAttribute]) -> None:
365368
"""
366369
info = self._ctx.cls.info
367370
for attr in attributes:
368-
if isinstance(attr.type, CallableType):
371+
if isinstance(get_proper_type(attr.type), CallableType):
369372
var = attr.to_var()
370373
var.info = info
371374
var.is_property = True

0 commit comments

Comments
 (0)