Description
I forgot to add a --typeshed
-like flag to pyrefly check
, which will let us override typeshed. This is useful for testing typeshed upgrades, testing how changes to typeshed will affect a codebase, and other typeshed-related changes.
This will involve a couple of steps. For whomever takes this on, I can turn this into more sub-tasks if that would make it easier for you!
- Add a CLI flag somewhere around
pyrefly/pyrefly/lib/commands/check.rs
Line 161 in cfb9561
- Add a
ConfigFile
option fortypeshed
path
pyrefly/pyrefly/lib/config/config.rs
Line 164 in cfb9561
- Wire it into our
find_import()
logic
pyrefly/pyrefly/lib/config/config.rs
Lines 342 to 346 in cfb9561
- You'l likely have to update our typeshed functionality (all in the file below) to handle loading a custom typeshed
pyrefly/pyrefly/lib/module/bundled.rs
Lines 124 to 129 in cfb9561