mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #928 from pre-commit/all-repos_autofix_pre-commit-flake8-migrate
Migrate to official pycqa/flake8 hooks repo
This commit is contained in:
commit
35a78c06d0
3 changed files with 13 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v2.0.0
|
rev: v2.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
|
|
@ -10,21 +10,24 @@ repos:
|
||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
- id: name-tests-test
|
- id: name-tests-test
|
||||||
- id: requirements-txt-fixer
|
- id: requirements-txt-fixer
|
||||||
|
- repo: https://gitlab.com/pycqa/flake8
|
||||||
|
rev: 3.7.1
|
||||||
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
- repo: https://github.com/pre-commit/mirrors-autopep8
|
- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||||
rev: v1.4
|
rev: v1.4.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: autopep8
|
- id: autopep8
|
||||||
- repo: https://github.com/pre-commit/pre-commit
|
- repo: https://github.com/pre-commit/pre-commit
|
||||||
rev: v1.11.2
|
rev: v1.14.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: validate_manifest
|
- id: validate_manifest
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v1.11.0
|
rev: v1.11.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
- repo: https://github.com/asottile/reorder_python_imports
|
- repo: https://github.com/asottile/reorder_python_imports
|
||||||
rev: v1.3.0
|
rev: v1.3.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: reorder-python-imports
|
- id: reorder-python-imports
|
||||||
language_version: python3
|
language_version: python3
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@ def partition(cmd, varargs, target_concurrency, _max_length=None):
|
||||||
|
|
||||||
arg_length = _command_length(arg) + 1
|
arg_length = _command_length(arg) + 1
|
||||||
if (
|
if (
|
||||||
total_length + arg_length <= _max_length
|
total_length + arg_length <= _max_length and
|
||||||
and len(ret_cmd) < max_args
|
len(ret_cmd) < max_args
|
||||||
):
|
):
|
||||||
ret_cmd.append(arg)
|
ret_cmd.append(arg)
|
||||||
total_length += arg_length
|
total_length += arg_length
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,9 @@ def no_warnings(recwarn):
|
||||||
message = str(warning.message)
|
message = str(warning.message)
|
||||||
# ImportWarning: Not importing directory '...' missing __init__(.py)
|
# ImportWarning: Not importing directory '...' missing __init__(.py)
|
||||||
if not (
|
if not (
|
||||||
isinstance(warning.message, ImportWarning)
|
isinstance(warning.message, ImportWarning) and
|
||||||
and message.startswith('Not importing directory ')
|
message.startswith('Not importing directory ') and
|
||||||
and ' missing __init__' in message
|
' missing __init__' in message
|
||||||
):
|
):
|
||||||
warnings.append('{}:{} {}'.format(
|
warnings.append('{}:{} {}'.format(
|
||||||
warning.filename,
|
warning.filename,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue