Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hhatto committed Mar 17, 2024
1 parent 0b4c5f2 commit 831f718
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class documentation for more information.
from configparser import ConfigParser as SafeConfigParser, Error

import pycodestyle
from pycodestyle import STARTSWITH_INDENT_STATEMENT_REGEX


__version__ = '2.1.0'
Expand Down Expand Up @@ -1095,8 +1094,11 @@ def fix_e702(self, result, logical):
# Avoid applying this when indented.
# https://docs.python.org/reference/compound_stmts.html
for line in logical_lines:
if (result['id'] == 'E702' and ':' in line
and STARTSWITH_INDENT_STATEMENT_REGEX.match(line)):
if (
result['id'] == 'E702'
and ':' in line
and pycodestyle.STARTSWITH_INDENT_STATEMENT_REGEX.match(line)
):
if self.options.verbose:
print(
'---> avoid fixing {error} with '
Expand Down

0 comments on commit 831f718

Please sign in to comment.