diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 383c467..b03ff3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,6 +5,12 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace exclude: ^tests/fixtures/diffs/ +- repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + args: [--line-length=78] + files: ^src/ - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.720 hooks: diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py index 68df9a2..7923698 100644 --- a/src/flake8/api/legacy.py +++ b/src/flake8/api/legacy.py @@ -41,7 +41,8 @@ def get_style_guide(**kwargs): application.find_plugins(config_finder) application.register_plugin_options() application.parse_configuration_and_cli( - config_finder, remaining_args, + config_finder, + remaining_args, ) # We basically want application.initialize to be called but with these # options set instead before we make our formatter, notifier, internal diff --git a/src/flake8/main/application.py b/src/flake8/main/application.py index e4b7930..5c9e076 100644 --- a/src/flake8/main/application.py +++ b/src/flake8/main/application.py @@ -180,7 +180,9 @@ class Application(object): Command-line arguments passed in directly. """ self.options, self.args = aggregator.aggregate_options( - self.option_manager, config_finder, argv, + self.option_manager, + config_finder, + argv, ) self.running_against_diff = self.options.diff @@ -328,7 +330,8 @@ class Application(object): self.find_plugins(config_finder) self.register_plugin_options() self.parse_configuration_and_cli( - config_finder, remaining_args, + config_finder, + remaining_args, ) self.make_formatter() self.make_guide() diff --git a/tox.ini b/tox.ini index 489cfb1..76a2ead 100644 --- a/tox.ini +++ b/tox.ini @@ -32,15 +32,6 @@ commands = flake8 --version flake8 src/flake8/ tests/ setup.py -# Autoformatter -[testenv:black] -basepython = python3 -skip_install = true -deps = - black>=19.3b0 -commands = - black --line-length 78 src/ - # Linters [testenv:flake8] basepython = python3 @@ -93,14 +84,12 @@ commands = basepython = python3 skip_install = true deps = - {[testenv:black]deps} {[testenv:flake8]deps} {[testenv:pylint]deps} {[testenv:doc8]deps} {[testenv:readme]deps} {[testenv:bandit]deps} commands = - {[testenv:black]commands} {[testenv:flake8]commands} {[testenv:pylint]commands} {[testenv:doc8]commands}