-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: pre-commit + black + isort + mypy #3282
Comments
@danielcweeks I'll look into setting this up |
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 [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 |
cabhishek
added a commit
to cabhishek/iceberg
that referenced
this issue
Oct 29, 2021
cabhishek
added a commit
to cabhishek/iceberg
that referenced
this issue
Nov 1, 2021
cabhishek
added a commit
to cabhishek/iceberg
that referenced
this issue
Nov 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add code infra for python project including pre-commit, black, isort, mypy to enforce standards.
The text was updated successfully, but these errors were encountered: