mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 20:40:08 -06:00
Migrate to official pycqa/flake8 hooks repo
Committed via https://github.com/asottile/all-repos
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user