Skip to content

Commit

Permalink
Make support casting case safer. (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
hadialqattan authored Oct 12, 2020
1 parent 0d11681 commit 5d1d062
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pycln/utils/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def visit_Call(self, node: ast.Call):
):
type_ = node.args[0]
value = getattr(type_, "value", "") or getattr(type_, "s", "")
self._source_stats.name_.add(value)
if value:
self._source_stats.name_.add(value)

@recursive
def visit_Try(self, node: ast.Try):
Expand Down

0 comments on commit 5d1d062

Please sign in to comment.