Skip to content

Commit

Permalink
fix(template): resolve pylance type-checking / import errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
  • Loading branch information
BradenM committed May 18, 2023
1 parent f5f5c98 commit 179c29d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions micropy/project/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def context(self):
ctx = {
"stubs": self.stubs or [],
"paths": stub_paths,
"typeshed_paths": json.dumps([str(s) for s in [*paths, "typings"]]),
"language_server": self.language_server,
}
return ctx
Expand Down
4 changes: 4 additions & 0 deletions micropy/project/template/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"python.languageServer": "Pylance",
"python.analysis.autoSearchPath": true,
"python.autoComplete.extraPaths": {{ paths }},
"python.analysis.diagnosticSeverityOverrides": { "reportMissingModuleSource": "none" },
"python.analysis.typeCheckingMode": "basic",
"python.autoComplete.typeshedPaths": {{ typeshed_paths }},
"python.analysis.typeshedPaths": {{ typeshed_paths }},
{% endif %}
{% if language_server == 'mpls' %}
"python.jediEnabled": false,
Expand Down

0 comments on commit 179c29d

Please sign in to comment.