Skip to content

Commit

Permalink
Merge pull request #681 from hhatto/add-pre-commit-config
Browse files Browse the repository at this point in the history
Add pre commit config
  • Loading branch information
hhatto authored Mar 19, 2023
2 parents ed18832 + 6a71c71 commit 5b9110b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
20 changes: 11 additions & 9 deletions autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 5b9110b

Please sign in to comment.