Skip to content

Commit 2946060

Browse files
committed
Migrate to official pycqa/flake8 hooks repo
Committed via https://github.com/asottile/all-repos
1 parent b268b37 commit 2946060

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.0.0
3+
rev: v2.1.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
@@ -10,21 +10,24 @@ repos:
1010
- id: debug-statements
1111
- id: name-tests-test
1212
- id: requirements-txt-fixer
13+
- repo: https://gitlab.com/pycqa/flake8
14+
rev: 3.7.1
15+
hooks:
1316
- id: flake8
1417
- repo: https://github.com/pre-commit/mirrors-autopep8
15-
rev: v1.4
18+
rev: v1.4.3
1619
hooks:
1720
- id: autopep8
1821
- repo: https://github.com/pre-commit/pre-commit
19-
rev: v1.11.2
22+
rev: v1.14.2
2023
hooks:
2124
- id: validate_manifest
2225
- repo: https://github.com/asottile/pyupgrade
23-
rev: v1.11.0
26+
rev: v1.11.1
2427
hooks:
2528
- id: pyupgrade
2629
- repo: https://github.com/asottile/reorder_python_imports
27-
rev: v1.3.0
30+
rev: v1.3.5
2831
hooks:
2932
- id: reorder-python-imports
3033
language_version: python3

pre_commit/xargs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def partition(cmd, varargs, target_concurrency, _max_length=None):
5858

5959
arg_length = _command_length(arg) + 1
6060
if (
61-
total_length + arg_length <= _max_length
62-
and len(ret_cmd) < max_args
61+
total_length + arg_length <= _max_length and
62+
len(ret_cmd) < max_args
6363
):
6464
ret_cmd.append(arg)
6565
total_length += arg_length

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def no_warnings(recwarn):
2929
message = str(warning.message)
3030
# ImportWarning: Not importing directory '...' missing __init__(.py)
3131
if not (
32-
isinstance(warning.message, ImportWarning)
33-
and message.startswith('Not importing directory ')
34-
and ' missing __init__' in message
32+
isinstance(warning.message, ImportWarning) and
33+
message.startswith('Not importing directory ') and
34+
' missing __init__' in message
3535
):
3636
warnings.append('{}:{} {}'.format(
3737
warning.filename,

0 commit comments

Comments
 (0)