From 1e5c086a995de691e00361a5df6b25c3b2f6beae Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 14 Sep 2023 13:37:06 -0700 Subject: [PATCH 1/3] Fix documentation and setting tags --- .vscode/settings.json | 3 ++- README.md | 20 ++++++++++---------- package.json | 5 ++++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bc9c549..83bd90f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,5 +24,6 @@ "editor.formatOnSave": true, "editor.wordBasedSuggestions": false, "editor.defaultFormatter": "ms-python.black-formatter" - } + }, + "editor.formatOnSave": true } diff --git a/README.md b/README.md index 5e8d265..db5c222 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,16 @@ If you want to disable mypy, you can [disable this extension](https://code.visua ## Settings -| Settings | Default | Description | -| ----------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| mypy-type-checker.args | `[]` | Custom arguments passed to `mypy`. E.g `"mypy-type-checker.args" = ["--config-file="]` | -| mypy-type-checker.severity | `{ "error": "Error", "note": "Information" }` | Controls mapping of severity from `mypy` to VS Code severity when displaying in the problems window. You can override specific `mypy` error codes `{ "error": "Error", "note": "Information", "name-defined": "Warning" }` | -| mypy-type-checker.path | `[]` | Setting to provide custom `mypy` executable. This will slow down linting, since we will have to run `mypy` executable every time or file save or open. Example 1: `["~/global_env/mypy"]` Example 2: `["conda", "run", "-n", "lint_env", "python", "-m", "mypy"]` | -| mypy-type-checker.interpreter | `[]` | Path to a python interpreter to use to run the linter server. | -| mypy-type-checker.importStrategy | `useBundled` | Setting to choose where to load `mypy` from. `useBundled` picks mypy bundled with the extension. `fromEnvironment` uses `mypy` available in the environment. | -| mypy-type-checker.showNotifications | `off` | Setting to control when a notification is shown. | -| mypy-type-checker.reportingScope | `file` | (experimental) Setting to control if problems are reported for files open in the editor (`file`) or for the entire workspace (`workspace`). | -| mypy-type-checker.preferDaemon | true | (experimental) Setting to control how to invoke mypy. If true, dmypy is preferred over mypy; otherwise, mypy is preferred. Be aware, that the latter may slow down linting since it requires the `mypy` executable to be run whenever a file is saved or opened. Note that this setting will be overridden if `mypy-type-checker.path` is set. | +| Settings | Default | Description | +| ----------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| mypy-type-checker.args | `[]` | Custom arguments passed to `mypy`. E.g `"mypy-type-checker.args" = ["--config-file="]` | +| mypy-type-checker.severity | `{ "error": "Error", "note": "Information" }` | Controls mapping of severity from `mypy` to VS Code severity when displaying in the problems window. You can override specific `mypy` error codes `{ "error": "Error", "note": "Information", "name-defined": "Warning" }` | +| mypy-type-checker.path | `[]` | Setting to provide custom `mypy` executable. This will slow down linting, since we will have to run `mypy` executable every time or file save or open. Example 1: `["~/global_env/mypy"]` Example 2: `["conda", "run", "-n", "lint_env", "python", "-m", "mypy"]` | +| mypy-type-checker.interpreter | `[]` | Path to a python interpreter to use to run the linter server. When set to `[]` interpreter for the workspace is obtained from `ms-python.python` extension. If set to some value, that value takes precedence, and Python extension is not queried for the interpreter. | +| mypy-type-checker.importStrategy | `useBundled` | Setting to choose where to load `mypy` from. `useBundled` picks mypy bundled with the extension. `fromEnvironment` uses `mypy` available in the environment. | +| mypy-type-checker.showNotifications | `off` | Setting to control when a notification is shown. | +| mypy-type-checker.reportingScope | `file` | (experimental) Setting to control if problems are reported for files open in the editor (`file`) or for the entire workspace (`workspace`). | +| mypy-type-checker.preferDaemon | true | (experimental) Setting to control how to invoke mypy. If true, `dmypy` is preferred over mypy; otherwise, mypy is preferred. Be aware, that the latter may slow down linting since it requires the `mypy` executable to be run whenever a file is saved or opened. Note that this setting will be overridden if `mypy-type-checker.path` is set. | ## Commands diff --git a/package.json b/package.json index 76f4866..9f614c9 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,10 @@ "default": true, "markdownDescription": "%settings.preferDaemon.description%", "scope": "resource", - "type": "boolean" + "type": "boolean", + "tags": [ + "experimental" + ] }, "mypy-type-checker.reportingScope": { "default": "file", From 50483592aa1d7bfedbb557ccf773422814534440 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 14 Sep 2023 15:58:08 -0700 Subject: [PATCH 2/3] Update README.md Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index db5c222..153e4c0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If you want to disable mypy, you can [disable this extension](https://code.visua | mypy-type-checker.args | `[]` | Custom arguments passed to `mypy`. E.g `"mypy-type-checker.args" = ["--config-file="]` | | mypy-type-checker.severity | `{ "error": "Error", "note": "Information" }` | Controls mapping of severity from `mypy` to VS Code severity when displaying in the problems window. You can override specific `mypy` error codes `{ "error": "Error", "note": "Information", "name-defined": "Warning" }` | | mypy-type-checker.path | `[]` | Setting to provide custom `mypy` executable. This will slow down linting, since we will have to run `mypy` executable every time or file save or open. Example 1: `["~/global_env/mypy"]` Example 2: `["conda", "run", "-n", "lint_env", "python", "-m", "mypy"]` | -| mypy-type-checker.interpreter | `[]` | Path to a python interpreter to use to run the linter server. When set to `[]` interpreter for the workspace is obtained from `ms-python.python` extension. If set to some value, that value takes precedence, and Python extension is not queried for the interpreter. | +| mypy-type-checker.interpreter | `[]` | Path to a python interpreter to use to run the linter server. When set to `[]`, the interpreter for the workspace is obtained from `ms-python.python` extension. If set to some path, that path takes precedence, and the Python extension is not queried for the interpreter. | | mypy-type-checker.importStrategy | `useBundled` | Setting to choose where to load `mypy` from. `useBundled` picks mypy bundled with the extension. `fromEnvironment` uses `mypy` available in the environment. | | mypy-type-checker.showNotifications | `off` | Setting to control when a notification is shown. | | mypy-type-checker.reportingScope | `file` | (experimental) Setting to control if problems are reported for files open in the editor (`file`) or for the entire workspace (`workspace`). | From 9124f2c11532ad5c9cf959aed9eaaff579913106 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 14 Sep 2023 15:58:48 -0700 Subject: [PATCH 3/3] format --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 153e4c0..50c03e8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If you want to disable mypy, you can [disable this extension](https://code.visua | mypy-type-checker.args | `[]` | Custom arguments passed to `mypy`. E.g `"mypy-type-checker.args" = ["--config-file="]` | | mypy-type-checker.severity | `{ "error": "Error", "note": "Information" }` | Controls mapping of severity from `mypy` to VS Code severity when displaying in the problems window. You can override specific `mypy` error codes `{ "error": "Error", "note": "Information", "name-defined": "Warning" }` | | mypy-type-checker.path | `[]` | Setting to provide custom `mypy` executable. This will slow down linting, since we will have to run `mypy` executable every time or file save or open. Example 1: `["~/global_env/mypy"]` Example 2: `["conda", "run", "-n", "lint_env", "python", "-m", "mypy"]` | -| mypy-type-checker.interpreter | `[]` | Path to a python interpreter to use to run the linter server. When set to `[]`, the interpreter for the workspace is obtained from `ms-python.python` extension. If set to some path, that path takes precedence, and the Python extension is not queried for the interpreter. | +| mypy-type-checker.interpreter | `[]` | Path to a python interpreter to use to run the linter server. When set to `[]`, the interpreter for the workspace is obtained from `ms-python.python` extension. If set to some path, that path takes precedence, and the Python extension is not queried for the interpreter. | | mypy-type-checker.importStrategy | `useBundled` | Setting to choose where to load `mypy` from. `useBundled` picks mypy bundled with the extension. `fromEnvironment` uses `mypy` available in the environment. | | mypy-type-checker.showNotifications | `off` | Setting to control when a notification is shown. | | mypy-type-checker.reportingScope | `file` | (experimental) Setting to control if problems are reported for files open in the editor (`file`) or for the entire workspace (`workspace`). |