-
Notifications
You must be signed in to change notification settings - Fork 627
Remove redundant decorators on individual @overloads
#4564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove redundant decorators on individual @overloads
#4564
Conversation
|
Oh woops, vscode seems to have messed up the formatting; sorry about that. |
|
( |
5a0eef2 to
3162024
Compare
|
Does this require a release note? |
|
yeah, since we cut a release on every merged PR*. You can put something as simple as "clean up internal *with source code changes |
Co-authored-by: Liam DeVoe <[email protected]>
|
Thanks Joren, this looks great! I'll be curious to follow along on the mypy issue for the root cause, though it's not too surprising they assumed users wouldn't apply weird transformations on top of I think CI is still a bit flaky, it's not your fault. |
|
re: https://github.com/HypothesisWorks/hypothesis/actions/runs/18502481240/job/52723140081?pr=4564
Not sure why it only errors on our free-threading CI job. I'll fix this soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm I think fixing that will be nontrivial. I'll open an issue and get to it later. Thanks again!
|
Thanks! |
For some reason this is causing stubtest to crash when running it on the numpy codebase while hypothesis is installed. I'm not saying this is your fault or anything, and I'll report this issue at mypy later today, But even so, there are some other reasons for removing these decorators, so I figured I might as well clean it up.
Decorating a function has a (slight) inpact on import time, so by removing these redundant decorators, importing this module will be slightly faster.
There are also some other obvious reasons, such as readability, maintainability, seeing as it's more "DRY" this way.