From 890b28c1e8d8cbe9480005c07fc06de42afad6c8 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Mon, 9 May 2022 12:00:20 +0200 Subject: [PATCH] Fix undisruptive formatting issues (#1848) * Skip unparsable pylib files with black This was causing black to return a non-zero code, preventing the subsequent isort from running. * Organise imports on save --- .vscode/settings.json | 3 +++ pylib/tests/run_format.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cf1f836b8..5c8bfa763 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,8 @@ { "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports": true + }, "files.watcherExclude": { "**/.git/objects/**": true, "**/.git/subtree-cache/**": true, diff --git a/pylib/tests/run_format.py b/pylib/tests/run_format.py index ceaa67bc5..f6a676d68 100644 --- a/pylib/tests/run_format.py +++ b/pylib/tests/run_format.py @@ -39,7 +39,7 @@ if __name__ == "__main__": "anki", "tests", "tools", - "--exclude=_pb2|buildinfo|_gen", + "--exclude=_pb2|buildinfo|_gen|_backend/generated|fluent", ] + args, check=False,