diff --git a/autopep8.py b/autopep8.py index ff0e97e6..1e86e202 100755 --- a/autopep8.py +++ b/autopep8.py @@ -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' @@ -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 '