Fix ty 0.0.55 diagnostics and prefab-ui protocol version drift - #4428
Merged
Conversation
Removes now-unused ty:ignore/type:ignore/cast suppressions that a newer ty resolves correctly on its own, adds a targeted ignore for a Client.__init__ overload gap ty now catches, and stops hardcoding the prefab-ui protocol version literal in tests so it tracks prefab_ui.app.PROTOCOL_VERSION instead of breaking on every prefab-ui release. Also bumps the ty floor to 0.0.55.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI on main started failing static analysis and unit tests: ty 0.0.55 now resolves several
max()return types on its own, so the# ty:ignore[invalid-return-type]andcast(...)wrappers around them tripunused-ignore-comment/redundant-cast(which are configured to fail the build). Separately,tests/test_apps_prefab.pyhardcoded the prefab-ui protocol version as the literal"0.2", and prefab-ui 0.20.1 bumped it to0.3— since prefab-ui is intentionally excluded from theexclude-newerlockfile pin, that test breaks on every prefab-ui release regardless of when we last touched this repo.This removes the now-unused suppressions, adds one new targeted
ty: ignore[no-matching-overload]where ty is now correctly flagging a real overload gap inProxyClient.__init__, asserts againstprefab_ui.app.PROTOCOL_VERSIONinstead of a literal in the tests, and bumps thetyfloor to0.0.55.Closes #4241