mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
pre-commit: add autoflake and isort, include autoformatter config
This commit is contained in:
34
pyproject.toml
Normal file
34
pyproject.toml
Normal file
@@ -0,0 +1,34 @@
|
||||
# autoflake is used for autoformatting Python code
|
||||
#
|
||||
# ref: https://github.com/PyCQA/autoflake#readme
|
||||
#
|
||||
[tool.autoflake]
|
||||
ignore-init-module-imports = true
|
||||
remove-all-unused-imports = true
|
||||
remove-duplicate-keys = true
|
||||
remove-unused-variables = true
|
||||
|
||||
|
||||
# isort is used for autoformatting Python code
|
||||
#
|
||||
# ref: https://pycqa.github.io/isort/
|
||||
#
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
|
||||
# black is used for autoformatting Python code
|
||||
#
|
||||
# ref: https://black.readthedocs.io/en/stable/
|
||||
#
|
||||
[tool.black]
|
||||
# target-version should be all supported versions, see
|
||||
# https://github.com/psf/black/issues/751#issuecomment-473066811
|
||||
target_version = [
|
||||
"py36",
|
||||
"py37",
|
||||
"py38",
|
||||
"py39",
|
||||
"py310",
|
||||
"py311",
|
||||
]
|
||||
Reference in New Issue
Block a user