Last active
November 30, 2023 03:36
-
-
Save frafra/8a877bd627ad49283585afa9a88790e2 to your computer and use it in GitHub Desktop.
Good defaults for a Python project: Poetry + pre-commit + black + flakehell + isort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repos: | |
- repo: local | |
hooks: | |
- id: black | |
name: black | |
entry: black | |
language: system | |
types: [python] | |
- repo: local | |
hooks: | |
- id: flakehell | |
name: flakehell | |
entry: flake8helled | |
language: system | |
types: [python] | |
- repo: local | |
hooks: | |
- id: isort | |
name: isort | |
entry: isort | |
language: system | |
types: [python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [...] | |
[tool.poetry.dev-dependencies] | |
pre-commit = "^2.12.0" | |
pytest = "^6.2.3" | |
black = "^20.8b1" | |
flakehell = "^0.9.0" | |
isort = "^5.8.0" | |
[tool.flakehell] | |
# https://flakehell.readthedocs.io/ | |
# https://black.readthedocs.io/en/stable/compatible_configs.html?highlight=flake8#flake8 | |
max-line-length = 88 | |
extend-ignore = "E203, W503" | |
# https://github.com/flakehell/flakehell/issues/10#issuecomment-822720074 | |
extended_default_ignore = [] # add this | |
[tool.isort] | |
# https://pycqa.github.io/isort/docs/configuration/black_compatibility/ | |
profile = "black" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment