From 831f71858967add06c1b678899349fab88113bf5 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Mon, 18 Mar 2024 08:07:33 +0900 Subject: [PATCH] refactoring --- autopep8.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 '