samredai commented on issue #3282:
URL: https://github.com/apache/iceberg/issues/3282#issuecomment-949776639
Here's a suggestion for the tox.ini changes for black and isort! There's
some conflict between flake8 and isort's opinions but adding `I100` and `I202`
to flake8's ignore should get them in sync. This will also let us run `tox -e
format` to reformat the source files accordingly before committing and pushing
(maybe that's what the pre-commit hook can run?).
```ini
[testenv:format]
description = reformat all source code
basepython = python3
deps =
black
isort
flake8
skip_install = true
commands =
isort --recursive --project iceberg --profile black setup.py src tests
black setup.py src tests
flake8 setup.py src tests
[testenv:linters]
basepython = python3
skip_install = true
deps =
.
{[testenv:isort]deps}
{[testenv:black]deps}
{[testenv:flake8]deps}
{[testenv:bandit]deps}
{[testenv:mypy]deps}
commands =
{[testenv:isort]deps}
{[testenv:black]deps}
{[testenv:flake8]commands}
{[testenv:bandit]commands}
{[testenv:mypy]commands}
[testenv:isort]
basepython = python3
skip_install = true
deps =
isort
commands =
isort --recursive --project iceberg --profile black --check-only
setup.py src tests
[testenv:black]
basepython = python3
skip_install = true
deps =
black
commands =
black --check --diff src setup.py tests
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]