Fix typing transparency for alternative decorators#14
Merged
Code0x58 merged 8 commits intoMay 9, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 195 196 +1
=========================================
+ Hits 195 196 +1 ☔ View full report in Codecov by Sentry. |
Code0x58
commented
May 9, 2026
| @overload | ||
| def reference[**P, R]( | ||
| implementation: ImplementationSig[P, R], *, default: bool = False | ||
| def reference[**P, R]( # pyrefly: ignore[inconsistent-overload] |
Owner
Author
There was a problem hiding this comment.
👀 this is just a temporary hack to get the pyrefly into the CI pipeline. mypy already passes so that is probably good enough. I'll get this looked into outside of Codex cloud, as that doesn't have pyrefly in the current environment
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.
Summary
alternative.pyso decorator-based APIs remain type-checker transparent while preserving runtime behaviorsetattrinAlternatives.callableandImplementation.__call__to satisfy type checkers without changing dispatch semanticsmeasuresorting to make comparator typing explicitValidation
uv run --dev ruff format .uv run --dev ruff format --check .uv run --dev mypy .uv run --dev pytestNotes
pyreflybinary is not available in this environment (uv run --dev pyrefly check .fails withNo such file or directory).Codex Task