diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ffdbe94..55e2d331 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.0.0 + rev: v2.1.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -10,21 +10,24 @@ repos: - id: debug-statements - id: name-tests-test - id: requirements-txt-fixer +- repo: https://gitlab.com/pycqa/flake8 + rev: 3.7.1 + hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v1.4 + rev: v1.4.3 hooks: - id: autopep8 - repo: https://github.com/pre-commit/pre-commit - rev: v1.11.2 + rev: v1.14.2 hooks: - id: validate_manifest - repo: https://github.com/asottile/pyupgrade - rev: v1.11.0 + rev: v1.11.1 hooks: - id: pyupgrade - repo: https://github.com/asottile/reorder_python_imports - rev: v1.3.0 + rev: v1.3.5 hooks: - id: reorder-python-imports language_version: python3 diff --git a/pre_commit/xargs.py b/pre_commit/xargs.py index e2686f0f..bd9205b7 100644 --- a/pre_commit/xargs.py +++ b/pre_commit/xargs.py @@ -58,8 +58,8 @@ def partition(cmd, varargs, target_concurrency, _max_length=None): arg_length = _command_length(arg) + 1 if ( - total_length + arg_length <= _max_length - and len(ret_cmd) < max_args + total_length + arg_length <= _max_length and + len(ret_cmd) < max_args ): ret_cmd.append(arg) total_length += arg_length diff --git a/tests/conftest.py b/tests/conftest.py index c7d81562..baaa64c9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,9 +29,9 @@ def no_warnings(recwarn): message = str(warning.message) # ImportWarning: Not importing directory '...' missing __init__(.py) if not ( - isinstance(warning.message, ImportWarning) - and message.startswith('Not importing directory ') - and ' missing __init__' in message + isinstance(warning.message, ImportWarning) and + message.startswith('Not importing directory ') and + ' missing __init__' in message ): warnings.append('{}:{} {}'.format( warning.filename,