Skip to content

Commit

Permalink
dx: fix VS Code mypy configuration to dramatically speed up things
Browse files Browse the repository at this point in the history
That damned extension was implicitly using its builtin version instead of our own. The result? The two of them were constantly overriding the cache, so mypy was very often starting from cold!
  • Loading branch information
frankie567 committed Jan 3, 2025
1 parent 6119f8d commit d1c9ba1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions polar.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
// Set the Python interpreter globally, so VS Code stops complaining about invalid interpreter on other folders
// Also fix the Ruff extension
"python.defaultInterpreterPath": "${workspaceFolder:server}/.venv/bin/python",
// Use our own version of mypy, to avoid cache conflicts between the extension version and our own version
"mypy-type-checker.importStrategy": "fromEnvironment",
}
}
3 changes: 2 additions & 1 deletion server/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"editor.defaultFormatter": "charliermarsh.ruff"
},
"ruff.lint.args": ["--config=ruff.vscode.toml"]
"ruff.lint.args": ["--config=ruff.vscode.toml"],
"mypy-type-checker.preferDaemon": true
}

0 comments on commit d1c9ba1

Please sign in to comment.