From 71f4ee4277edc3128f1295e1974e411b9d739404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=20Vinh=20LUONG=20=28L=C6=AF=C6=A0NG=20Th=E1=BA=BF=20Vi?= =?UTF-8?q?nh=29?= Date: Fri, 3 Jan 2025 11:55:19 -0800 Subject: [PATCH 1/3] update VSCode Flake8 linting settings --- .vscode/settings.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e8b108fb5..48a15fe26 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -31,6 +31,7 @@ // FLAKE8 // ====== + // marketplace.visualstudio.com/items?itemName=ms-python.flake8 // Arguments passed to Flake8 for linting Python files. // Each argument should be provided as a separate string in the array. @@ -54,14 +55,14 @@ "info": "Information", "refactor": "Hint", "warning": "Warning" - }, + }, // Path or command to be used by the extension to lint Python files with Flake8. // Accepts an array of a single or multiple strings. // If passing a command, each argument should be provided as a separate string in the array. // If set to ["flake8"], it will use the version of Flake8 available in the PATH environment variable. // Note: Using this option may slowdown linting. - // "flake8.path": [], + // "flake8.path": [], // Path to a Python executable or a command that will be used to launch the Flake8 server and any subprocess. // Accepts an array of a single or multiple strings. @@ -82,9 +83,6 @@ // Accepted values are onError, onWarning, always and off. "flake8.showNotification": "onWarning", - // Enable linting Python files with Flake8 as you type. - "flake8.lintOnChange": true, - // Configure glob patterns as supported by the fnmatch Python library (https://docs.python.org/3/library/fnmatch.html) // to exclude files or folders from being linted with Flake8. "flake8.ignorePatterns": [ From 5e409ce2c7c494fe32c1b7b0ad51cf5d8097f845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=20Vinh=20LUONG=20=28L=C6=AF=C6=A0NG=20Th=E1=BA=BF=20Vi?= =?UTF-8?q?nh=29?= Date: Fri, 3 Jan 2025 14:37:12 -0800 Subject: [PATCH 2/3] update VSCode PyLint linting settings --- .vscode/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 48a15fe26..bc2bba40c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -92,6 +92,7 @@ // PYLINT // ====== + // marketplace.visualstudio.com/items?itemName=ms-python.pylint // Arguments passed to Pylint for linting Python files. // Each argument should be provided as a separate string in the array. From d53f8fbcc0342eff53bfc075db0d018bb24aad20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=20Vinh=20LUONG=20=28L=C6=AF=C6=A0NG=20Th=E1=BA=BF=20Vi?= =?UTF-8?q?nh=29?= Date: Fri, 3 Jan 2025 15:56:51 -0800 Subject: [PATCH 3/3] update VSCode Ruff linting configurations --- .vscode/settings.json | 54 +++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bc2bba40c..012143ff0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,7 +19,12 @@ // ====== "[python]": { - "editor.formatOnSave": false + "editor.formatOnSave": false, + "editor.defaultFormatter": null + // "editor.codeActionsOnSave": { + // "source.fixAll": "explicit", + // "source.organizeImports": "explicit" + // } }, "python.analysis.diagnosticSeverityOverrides": { @@ -160,43 +165,22 @@ // RUFF // ==== + // marketplace.visualstudio.com/items?itemName=charliermarsh.ruff + // docs.astral.sh/ruff/editors/settings - // Additional command-line arguments to pass to ruff check, e.g., "args": ["--config=/path/to/pyproject.toml"]. - // Supports a subset of Ruff's command-line arguments, ignoring those that are required to operate the LSP, - // like --force-exclude and --verbose. - "ruff.lint.args": [ - ], - - // Path to a custom ruff executable, e.g., ["/path/to/ruff"]. - "ruff.path": [], - - // Path to a Python interpreter to use to run the linter server. - "ruff.interpreter": [], - - // Strategy for loading the ruff executable. - // fromEnvironment picks up Ruff from the environment, falling back to the bundled version if needed. - // useBundled uses the version bundled with the extension. - "ruff.importStrategy": "fromEnvironment", - - // Run Ruff on every keystroke (onType) or on save (onSave). - "ruff.lint.run": "onSave", - - // Whether to enable the Ruff extension. - // Modifying this setting requires restarting VS Code to take effect. - "ruff.enable": true, - - // Whether to register Ruff as capable of handling source.organizeImports actions. - "ruff.organizeImports": true, + "ruff.nativeServer": "on", - // Whether to register Ruff as capable of handling source.fixAll actions. - "ruff.fixAll": false, + "ruff.configuration": ".ruff.toml", - // Whether to display Quick Fix actions to autofix violations. - "ruff.codeAction.fixViolation.enable": true, + "ruff.lineLength": 120, + "ruff.organizeImports": false - // Whether to display Quick Fix actions to disable rules via noqa suppression comments. - "ruff.codeAction.disableRuleComment.enable": true, + // Python-based Ruff server only + // ----------------------------- + // "ruff.importStrategy": "fromEnvironment", + // "ruff.interpreter": [], + // "ruff.path": [], - // Setting to control when a notification is shown: off, onError, onWarning, always. - "ruff.showNotification": "onWarning" + // "ruff.lint.args": [], + // "ruff.format.args": [], }