Migrate to official pycqa/flake8 hooks repo

Committed via https://github.com/asottile/all-repos
This commit is contained in:
Anthony Sottile
2019-01-30 00:39:01 -08:00
parent b268b37482
commit 29460606b2
3 changed files with 13 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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,