- Notifications
You must be signed in to change notification settings - Fork673
chore: Remove trivial get methods in preparation for generic Get mixin#3110
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
chore: Remove trivial get methods in preparation for generic Get mixin#3110
Conversation
d53c2e3
to6cdbad3
CompareUh oh!
There was an error while loading.Please reload this page.
Currently because the Get mixin is not generic every subclass hasto implement its own `get` methods to type hint `get` method returnbeoynd the basic RESTObject.The upcoming PR will change Get mixin to use generics. This meansit will be able to type hint the corresponding `_obj_cls` and no`get` method would need to be redefined.Because removing existing `get` methods modifies a lot of filessplit it in to a separate commit.Also remove the `tests/unit/meta/test_ensure_type_hints.py` filebecause testing subclasses for `get` methods is no longer relevant.Signed-off-by: Igor Ponomarev <igor.ponomarev@collabora.com>
6cdbad3
to6efad64
Comparecodecovbot commentedJan 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #3110 +/- ##==========================================+ Coverage 96.80% 97.28% +0.47%========================================== Files 97 97 Lines 6358 6006 -352 ==========================================- Hits 6155 5843 -312+ Misses 203 163 -40
Flags with carried forward coverage won't be shown.Click here to find out more.
|
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.
WOW! Big PR, but relatively easy to review.
Thanks ❤️
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.
Thanks a lot for splitting this out@igorp-collabora! Seeing all the removals isolated like that is super clear 👍
edd01a5
intopython-gitlab:mainUh oh!
There was an error while loading.Please reload this page.
Currently because the Get mixin is not generic every subclass has to implement its own
get
methods to type hintget
method return beoynd the basic RESTObject.The upcoming#3083 PR will change Get mixin to use generics. This means it will be able to type hint the corresponding
_obj_cls
and noget
method would need to be redefined.Because removing existing
get
methods modifies a lot of files split it in to a separate commit.Also remove the
tests/unit/meta/test_ensure_type_hints.py
file because testing subclasses forget
methods is no longer relevant.