Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates from basedpyright to ty as the Python type checker. The change updates the Nix development environment to use ty instead of the previous type checker.
- Replaced
basedpyrightwithtyin the Nix development shell's buildInputs - Updated the pre-commit hook to use the
tybinary directly from nixpkgs instead of viauv run
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| enable = true; | ||
| name = "ty"; | ||
| entry = "${pkgs.uv}/bin/uv run ty check"; | ||
| entry = "${pkgs.ty}/bin/ty check"; |
There was a problem hiding this comment.
The pre-commit hook entry for ty is missing the target directory argument. The justfile's ty target (line 31) runs uv run ty check stackone_ai, but this hook runs ty check without specifying the directory to check. This inconsistency may cause the hook to check different files than intended or fail to locate the files to check.
| entry = "${pkgs.ty}/bin/ty check"; | |
| entry = "${pkgs.ty}/bin/ty check stackone_ai"; |
| devShells.default = pkgs.mkShell { | ||
| buildInputs = with pkgs; [ | ||
| uv | ||
| ty |
There was a problem hiding this comment.
The PR title says "basepyright -> ty" but the actual package being removed is "basedpyright" (note the 'd'). While this is just a title issue and doesn't affect the code, it creates confusion about what's being replaced.
Summary by cubic
Switched Python type checking from BasedPyright to Ty to standardize tooling and simplify execution.
Updated flake.nix to call ${pkgs.ty}/bin/ty check, added ty to devShell inputs, and removed BasedPyright.
Written for commit 4301733. Summary will update on new commits.