From 0d04dd4f44333ebce638620cf5bf5f1126eaa684 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Sun, 19 Mar 2023 15:41:08 +0900 Subject: [PATCH 1/2] add pre-commit-config --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..7c2242d8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 From 6a71c71b22bfa2ef373a774a3a461291364f02a9 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Sun, 19 Mar 2023 15:43:45 +0900 Subject: [PATCH 2/2] format --- autopep8.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/autopep8.py b/autopep8.py index 573f7acc..5e2a9fda 100755 --- a/autopep8.py +++ b/autopep8.py @@ -3658,15 +3658,17 @@ def apply_global_fixes(source, options, where='global', filename='', codes = [] if any(code_match(code, select=options.select, ignore=options.ignore) for code in ['E101', 'E111']): - source = reindent(source, - indent_size=options.indent_size, - leave_tabs=not ( - code_match( - 'W191', - select=options.select, - ignore=options.ignore) - ) - ) + source = reindent( + source, + indent_size=options.indent_size, + leave_tabs=not ( + code_match( + 'W191', + select=options.select, + ignore=options.ignore + ) + ) + ) for (code, function) in global_fixes(): if code_match(code, select=options.select, ignore=options.ignore):