Merge branch 'upgrade_black' into 'master'

upgrade black and run via pre-commit

See merge request pycqa/flake8!449
This commit is contained in:
Anthony Sottile 2020-08-27 22:33:44 +00:00
commit abdc9b14d6
4 changed files with 13 additions and 14 deletions

View file

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

View file

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

View file

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

11
tox.ini
View file

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