Skip to content

VSCodium Python: ty and ruff from Nix, the org standard - #50

Merged
andrewthomaslee merged 1 commit into
mainfrom
vscodium-python-org-standard
Nov 14, 2026
Merged

andrewthomaslee merged 1 commit into
mainfrom
vscodium-python-org-standard

Conversation

@andrewthomaslee

Copy link
Copy Markdown
Member

Summary

homeSpec.programs.vscodium.languages.python now follows the org Python standard (uv2nix skill, pkgs template .vscode/) instead of basedpyright.

 extensions (languages.python)
   ms-python.python
   ms-python.debugpy
-  detachhead.basedpyright
+  astral-sh.ty                 # language server, as checks.python-ty is the type check
   charliermarsh.ruff
+  tamasfe.even-better-toml     # pyproject.toml incl. [tool.uv|ruff|ty]

 userSettings
+  "ty.path"   = [ <org nixpkgs ty>/bin/ty ]      # same version as CI
+  "ruff.path" = [ <org nixpkgs ruff>/bin/ruff ]  # same version as treefmt
+  "ty.diagnosticMode" = "workspace"
+  "python.terminal.activateEnvironment" = false
+  "python.testing.pytestEnabled" = true; unittestEnabled = false
   "[python]".codeActionsOnSave
+    "source.fixAll" = "explicit"
     "source.organizeImports" = "explicit"
 nixd nixpkgs.expr (languages.nix.flake)
-  import f.inputs.nixpkgs { }
+  import f.inputs.nixpkgs { overlays = [ (f.inputs.org-pkgs.overlays.default or (_: _: { })) ]; }

These are user-wide fallbacks. An org repo's .vscode/settings.json still wins and points ty, ruff and the interpreter at .devenv/profile.

Evidence

  • Before: netsa's extensions had detachhead.basedpyright with no ty; ruff ran the extension's bundled binary; nixd's user-level nixpkgs had no org packages.
    After (home's kamrui-h1 evaluated with --override-input modules path:…):
    • extensions: ms-python-python-2026.4.0, ms-python-debugpy-2026.6.0, astral-sh-ty-2026.90.0, charliermarsh-ruff-2026.94.0, tamasfe-even-better-toml-0.21.2
    • ruff.path → ruff-0.17.2, ty.path → ty-0.0.91 (the org nixpkgs, same as CI)
    • home-manager.users.netsa.home-files builds
    • nixd expr: home gives pkgs.moscripts; a flake without org-pkgs (pkgs) falls back to plain nixpkgs
  • fmt: clean. check: all checks passed (one existing stdenv.isDarwin deprecation warning, not a deny).

Merge Danger

Door: two-way

Blast Radius: editor

Only VSCodium users with languages.python.enable are affected (netsa; matt if enabled) once home bumps modules. With mutableExtensions = true, an Open VSX copy of basedpyright installed by hand stays until the user uninstalls it.

Merge order: this PR, then the skills docs PR, then home (nix flake update modules).

🤖 Generated with Claude Code

languages.python installed basedpyright, which disagrees with the ty type
check CI runs (checks.python-ty) and doubles up with ty in org repos
whose .vscode/ recommends it. It now matches the uv2nix skill and the
pkgs template: ty (astral-sh.ty) is the language server, ty and ruff run
the org nixpkgs binaries (the versions treefmt and CI use), ruff applies
safe fixes on save, pytest is the test runner, the terminal is never
activated, and Even Better TOML validates pyproject.toml. A repo's
.vscode/settings.json still points them at its .devenv/profile.

nixd's user-wide nixpkgs gets the org overlay when the flake has an
org-pkgs input, as the template's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewthomaslee
andrewthomaslee enabled auto-merge (squash) November 14, 2026 21:57
@andrewthomaslee
andrewthomaslee merged commit 525bb2e into main Nov 14, 2026
3 checks passed
andrewthomaslee added a commit to external-systems/skills that referenced this pull request Nov 14, 2026
homeModules.vscodium's languages.python now follows the org standard
(external-systems/modules#50): ty and ruff from the org nixpkgs, no
basedpyright. toolchain.md documents the user level next to the repo
.vscode/, why there is no uv extension, Even Better TOML for
pyproject.toml, and removing a hand-installed basedpyright.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
andrewthomaslee added a commit that referenced this pull request Nov 14, 2026
Picks up external-systems/skills#22, which documents the VSCodium Python
defaults from #50.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant