You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type-Check the Carried hub_fetch_run.py So It Passes a Carrier's Strict Checker #4266
Each downstream repository carries hub_fetch_run.py at its root. The hub type-checks no copy of it, since its own [tool.mypy] files and [tool.pyright] include both leave out catalog/. So nothing shows the helper passes the type checker a carrying repository runs.
Pyright passes it in basic and strict mode. mypy --strict reports one error, hub_fetch_run.py:90: error: Returning Any from function declared to return "str | None" [no-any-return].
Under CI, a carrying repository's checker reaches the root copy only where its own config puts the root in scope. Pyright with no include checks every file under its directory, the root included. A mypy config listing the root, or ., does the same. Such a repository then fails CI on a file it must not edit.
Found by the local strict review on the #4263 fix, which handles ruff only. The type checker is a separate class.
Done when
catalog/snippets/hub_fetch_run.py passes mypy --strict and strict pyright.
The hub type-checks that copy in its own gate, so a regression fails there first.
Or, where the maintainer prefers, the type-check commands carry an exclude for the root copy as the ruff calls do.
Activity
Exclude the Root Fetch Helper on ruff's Command Line (#4267)
Type-Check the Snippet as Linux, macOS and Windows Code
Type-Check the Carried hub_fetch_run.py Strictly in the Hub (#4280)