update config of black and isort

black:
- extend-exclude legacy scripts
- config for python 3.9 as long as we support it
isort:
- set atomic to true to only apply if no syntax errors are introduced
- config for python 3.9 as long as we support it
- extend_skib_glob legacy scripts
- filter_files
- match line_length with black
- remove_redundant_aliases
- skip_gitignore
- set src paths
- include virtual_env to detect third party modules
This commit is contained in:
mauwii 2023-02-18 14:47:36 +01:00
parent bfe64b1510
commit e80160f8dd
No known key found for this signature in database
GPG Key ID: D923DB04ADB3F5AB

View File

@ -147,11 +147,26 @@ version = {attr = "ldm.invoke.__version__"}
"invokeai.frontend.dist" = ["**"]
[tool.black]
extend-exclude = '''
/(
# skip legacy scripts
| scripts/orig_scripts
)/
'''
line-length = 88
target-version = ['py310']
target-version = ['py39']
[tool.isort]
atomic = true
extend_skip_glob = ["scripts/orig_scripts/*"]
filter_files = true
line_length = 88
profile = "black"
py_version = 39
remove_redundant_aliases = true
skip_gitignore = true
src_paths = ["installer", "invokeai", "ldm", "tests"]
virtual_env = ".venv"
[tool.coverage.run]
branch = true