Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

igorp-collabora
Copy link
Contributor

Currently because the Get mixin is not generic every subclass has to implement its ownget 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 existingget methods modifies a lot of files split it in to a separate commit.

Also remove thetests/unit/meta/test_ensure_type_hints.py file because testing subclasses forget methods is no longer relevant.

JohnVillalovos and nejch reacted with heart emoji
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>
@igorp-collaboraigorp-collaboraforce-pushed therest-manager-remove-extra-get branch from6cdbad3 to6efad64CompareJanuary 29, 2025 17:39
@codecovCodecov
Copy link

codecovbot commentedJan 29, 2025
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.28%. Comparing base(515a8a2) to head(6efad64).
Report is 1 commits behind head on main.

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
FlagCoverage Δ
api_func_v483.46% <100.00%> (+0.42%)⬆️
cli_func_v484.56% <100.00%> (+1.50%)⬆️
unit90.12% <100.00%> (+0.75%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Files with missing linesCoverage Δ
gitlab/client.py98.73% <100.00%> (ø)
gitlab/v4/objects/appearance.py100.00% <100.00%> (ø)
gitlab/v4/objects/audit_events.py100.00% <ø> (ø)
gitlab/v4/objects/award_emojis.py100.00% <ø> (+10.38%)⬆️
gitlab/v4/objects/badges.py100.00% <ø> (ø)
gitlab/v4/objects/boards.py100.00% <ø> (+4.65%)⬆️
gitlab/v4/objects/branches.py100.00% <ø> (ø)
gitlab/v4/objects/broadcast_messages.py100.00% <ø> (ø)
gitlab/v4/objects/bulk_imports.py100.00% <ø> (ø)
gitlab/v4/objects/ci_lint.py100.00% <100.00%> (ø)
... and52 more

Copy link
Member

@JohnVillalovosJohnVillalovos left a 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 ❤️

nejch reacted with thumbs up emoji
Copy link
Member

@nejchnejch left a 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 👍

@nejchnejch merged commitedd01a5 intopython-gitlab:mainJan 29, 2025
18 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JohnVillalovosJohnVillalovosJohnVillalovos approved these changes

@nejchnejchnejch approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@igorp-collabora@JohnVillalovos@nejch

[8]ページ先頭

©2009-2025 Movatter.jp