Skip to content

Commit

Permalink
Update Mypy settings descriptions (#218)
Browse files Browse the repository at this point in the history
* Update Mypy settings descriptions

* Apply suggestions from code review

Co-authored-by: Karthik Nadig <kanadig@microsoft.com>

---------

Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
  • Loading branch information
luabud and karthiknadig committed Nov 13, 2023
1 parent d7d5147 commit b7c51d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ There are several settings you can configure to customize the behavior of this e
<tr>
<td>mypy-type-checker.ignorePatterns</td>
<td><code>[]</code></td>
<td>Configure <a href="https://code.visualstudio.com/docs/editor/glob-patterns">glob patterns</a> to exclude files or folders from being type checked by Mypy.</td>
<td>Configure <a href="https://docs.python.org/3/library/fnmatch.html">glob patterns</a> as supported by the fnmatch Python library to exclude files or folders from being type checked by Mypy.</td>
</tr>
</table>

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"mypy-type-checker.cwd": {
"default": "${workspaceFolder}",
"description": "%settings.cwd.description%",
"markdownDescription": "%settings.cwd.description%",
"scope": "resource",
"type": "string",
"examples": [
Expand All @@ -95,7 +95,7 @@
},
"mypy-type-checker.ignorePatterns": {
"default": [],
"description": "%settings.ignorePatterns.description%",
"markdownDescription": "%settings.ignorePatterns.description%",
"items": {
"type": "string"
},
Expand Down
8 changes: 5 additions & 3 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
"extension.description": "Type checking support for Python files using Mypy.",
"command.restartServer": "Restart Server",
"settings.args.description": "Arguments passed to Mypy to enable type checking on Python files. Each argument should be provided as a separate string in the array. \n Example: \n `\"mypy-type-checker.args\" = [\"--config-file=<file>\"]`",
"settings.cwd.description": "Sets the current working directory used to lint Python files with Mypy. By default, it uses the root directory of the workspace `${workspaceFolder}`. You can set it to `${fileDirname}` to use the parent folder of the file being linted as the working directory for Mypy.",
"settings.severity.description": "Mapping of Mypy's message types to VS Code's diagnostic severity levels as displayed in the Problems window. You can also use it to override specific Mypy error codes. <br>For example: `{\"error\": \"Error\", \"note\": \"Information\", \"name-defined\": \"Warning\" }`",
"settings.path.description": "Path or command to be used by the extension to type check Python files with Mypy. 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 `[\"mypy\"]`, it will use the version of Mypy available in the `PATH` environment variable. Note: Using this option may slowdown type checking. \n Examples: \n- `[\"~/global_env/mypy\"]` \n- `[\"conda\", \"run\", \"-n\", \"lint_env\", \"python\", \"-m\", \"mypy\"]`",
"settings.importStrategy.description": "defines which Mypy binary to be used to type check Python files. When set to `useBundled`, the extension will use the Mypy binary that is shipped with the extension. When set to `fromEnvironment`, the extension will attempt to use the Mypy binary and all dependencies that are available in the currently selected environment. Note: If the extension can't find a valid Mypy binary in the selected environment, it will fallback to using the Mypy binary that is shipped with the extension. Note: The `mypy-type-checker.path` setting takes precedence and overrides the behavior of `mypy-type-checker.importStrategy`.",
"settings.path.description": "Path or command to be used by the extension to type check Python files with Mypy. 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 `[\"mypy\"]`, it will use the version of Mypy available in the `PATH` environment variable. <br> Note: Using this option may slowdown type checking. \n Examples: \n- `[\"~/global_env/mypy\"]` \n- `[\"conda\", \"run\", \"-n\", \"lint_env\", \"python\", \"-m\", \"mypy\"]`",
"settings.ignorePatterns.description": "Configure [glob patterns](https://docs.python.org/3/library/fnmatch.html) as supported by the fnmatch Python library to exclude files or folders from being linted with Mypy.",
"settings.importStrategy.description": "Defines which Mypy binary to be used to type check Python files. When set to `useBundled`, the extension will use the Mypy binary that is shipped with the extension. When set to `fromEnvironment`, the extension will attempt to use the Mypy binary and all dependencies that are available in the currently selected environment. <br> Note: If the extension can't find a valid Mypy binary in the selected environment, it will fallback to using the Mypy binary that is shipped with the extension. The `mypy-type-checker.path` setting takes precedence and overrides the behavior of `mypy-type-checker.importStrategy`.",
"settings.importStrategy.useBundled.description": "Always use the bundled version of Mypy shipped with the extension.",
"settings.importStrategy.fromEnvironment.description": "Use Mypy from the selected environment. If the extension fails to find a valid Mypy binary, it will fallback to using the bundled version of Mypy.",
"settings.interpreter.description": "Path to a Python executable or a command that will be used to launch the Mypy server and any subprocess. Accepts an array of a single or multiple strings. When set to `[]`, the extension will use the path to the selected Python interpreter. If passing a command, each argument should be provided as a separate string in the array.",
"settings.preferDaemon.description": "Whether the Mypy daemon (`dmypy`) will take precedence over `mypy`for type checking. Note: if `mypy-type-checker.reportingScope`is set to `workspace`, enabling the Mypy daemon will offer a faster type checking experience. This setting will be overridden if `mypy-type-checker.path`is set.",
"settings.preferDaemon.description": "Whether the Mypy daemon (`dmypy`) will take precedence over `mypy`for type checking. <br> Note: if `mypy-type-checker.reportingScope`is set to `workspace`, enabling the Mypy daemon will offer a faster type checking experience. This setting will be overridden if `mypy-type-checker.path`is set.",
"settings.reportingScope.description": "Controls the scope of Mypy's problem reporting. If set to `file`, Mypy will limit its problem reporting to the files currently open in the editor. If set to `workspace`, Mypy will extend its problem reporting to include all files within the workspace. ",
"settings.reportingScope.file.description": "Problems are reported for the files open in the editor only.",
"settings.reportingScope.workspace.description": "Problems are reported for all files within the workspace.",
Expand Down

0 comments on commit b7c51d9

Please sign in to comment.