-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Convert more record classes to dataclasses #12659
Conversation
ichard26
commented
Apr 29, 2024
•
edited
Loading
edited
- Removes BestCandidateResult's iter_all() and iter_applicable() methods as they were redundant
- Removes ParsedLine's is_requirement attribute as it was awkward to use (to please mypy, you would need to add asserts on .requirement)
9eb70f9
to
748aff7
Compare
- Removes BestCandidateResult's iter_all() and iter_applicable() methods as they were redundant - Looking closer at SelectionPreferences, it only used slots to prevent accidental new attribute assignment (not for reduced memory usage as I previously thought) so this is safe to convert - Removes ParsedLine's is_requirement attribute as it was awkward to use (to please mypy, you would need to add asserts on .requirement)
@pradyunsg can I kindly request another review from you? :) (this is a very low priority PR, so please spend your time elsewhere if needed) |
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.
LGTM, with a minor suggestion.
I've added slots for those two requirement file dataclasses. Unfortunately, |
*bump* This PR is a pure refactoring change and is low-risk. It should be trivial to review. P.S. If you find my bumps annoying, please let me know and I will stop. I just hate seeing otherwise good PRs never land because they're so old that no one sees them. |