Skip to content

Commit

Permalink
Fix Sequence name-defined false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbundy committed Jun 26, 2022
1 parent 7f26359 commit 1230b2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mypy_django_plugin/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,9 @@ def bind_or_analyze_type(t: MypyType, api: SemanticAnalyzer, module_name: Option
That should hopefully give a bound type."""
if isinstance(t, UnboundType) and module_name is not None:
node = api.lookup_fully_qualified_or_none(module_name + "." + t.name)
if node is not None and node.type is not None:
return node.type
if node is None:
return None
return node.type

return api.anal_type(t)

Expand Down

0 comments on commit 1230b2a

Please sign in to comment.