Skip to content

Commit

Permalink
strict lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hhatto committed Mar 17, 2024
1 parent a7ada1f commit a423a61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,9 @@ def fix_e721(self, result):
_prefix = "".join(_tmp[:-1])

if match.groups()[0] is None:
fix_line = f"{_prefix} isinstance({_type_comp}{target[end:-1]}){target[-1:]}"
_suffix = target[-1:]
_target = f"{_type_comp}{target[end:-1]}"
fix_line = f"{_prefix} isinstance({_target}){_suffix}"
else:
fix_line = f"{_prefix} isinstance({_type_comp}){target[end:]}"
self.source[line_index] = fix_line
Expand Down

0 comments on commit a423a61

Please sign in to comment.