Skip to content

Commit

Permalink
Don't choke on inferred types of "None"
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jun 4, 2021
1 parent 78f80d5 commit feeb8e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flake8_encodings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,4 @@ def get_inferred_types(jedi_script: jedi.Script, node: ast.Call) -> List[str]:
for inferred_name in jedi_script.infer(node.lineno, node.func.col_offset + len('.'.join(attr_names[:-1]))):
inferred_types.add(inferred_name.full_name)

return sorted(inferred_types)
return sorted(filter(None, inferred_types))

0 comments on commit feeb8e4

Please sign in to comment.