Skip to content

Commit d2604b1

Browse files
tell mypy to try harder for import cycles (#7)
1 parent 179fd03 commit d2604b1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mypy_django_plugin/transformers/settings.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ def get_type_of_settings_attribute(
3838
sym = module.names.get(setting_name)
3939
if sym is not None:
4040
if sym.type is None:
41-
ctx.api.fail(
42-
f"Import cycle from Django settings module prevents type inference for {setting_name!r}",
43-
ctx.context,
44-
)
41+
typechecker_api.handle_cannot_determine_type(setting_name, ctx.context)
4542
return ctx.default_attr_type
4643
return sym.type
4744

0 commit comments

Comments
 (0)