Skip to content

Commit

Permalink
Remove follow-imports argument which may conflict with projects
Browse files Browse the repository at this point in the history
mypy prioritises values from configuration on its command line
over that provided in configuration files. This means that the
value previously provided here could override the settings for a
project, cause spurious errors and/or hiding true errors.

Removing this default value allows users freedom to configure
their projects however they like, without the extension injecting
unexpected additional configuration within the IDE context.

Fixes microsoft#89
  • Loading branch information
PeterJCLaw committed Jul 17, 2023
1 parent 55407dd commit 7c2d8d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bundled/tool/lsp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def _parse_output_using_regex(
continue

# skip output from other documents
# (causes --follow-imports=normal to behave like silent).
# (mypy will follow imports, so may include errors found in other
# documents; this is fine/correct, we just need to account for it).
if data["filepath"] != document.path:
continue

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@
"configuration": {
"properties": {
"mypy-type-checker.args": {
"default": [
"--follow-imports=normal"
],
"default": [],
"markdownDescription": "%settings.args.description%",
"items": {
"type": "string"
Expand Down

0 comments on commit 7c2d8d8

Please sign in to comment.