From e80160f8dd84b8919871db655ae0e7d4589a2900 Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 18 Feb 2023 14:47:36 +0100 Subject: [PATCH] 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 --- pyproject.toml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d1cd1d1938..cfc4ad364b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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