Skip to content

chore: correct type-hints for per_page attrbute #1880

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

Merged
merged 1 commit into from
Feb 5, 2022
Merged

Conversation

JohnVillalovos
Copy link
Member

There are occasions where a GitLab list() call does not return the
x-per-page header. For example the listing of custom attributes.

Update the type-hints to reflect that.

@JohnVillalovos JohnVillalovos requested a review from nejch February 5, 2022 18:42
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2022

Codecov Report

Merging #1880 (e825653) into main (9897c98) will decrease coverage by 4.70%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1880      +/-   ##
==========================================
- Coverage   92.50%   87.80%   -4.71%     
==========================================
  Files          78       78              
  Lines        4871     4871              
==========================================
- Hits         4506     4277     -229     
- Misses        365      594     +229     
Flag Coverage Δ
cli_func_v4 81.68% <66.66%> (ø)
py_func_v4 ?
unit 83.35% <100.00%> (ø)

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

Impacted Files Coverage Δ
gitlab/base.py 92.06% <100.00%> (-0.53%) ⬇️
gitlab/client.py 87.40% <100.00%> (-3.15%) ⬇️
gitlab/v4/objects/files.py 61.84% <0.00%> (-38.16%) ⬇️
gitlab/v4/objects/milestones.py 70.96% <0.00%> (-29.04%) ⬇️
gitlab/v4/objects/repositories.py 58.46% <0.00%> (-24.62%) ⬇️
gitlab/utils.py 64.51% <0.00%> (-22.59%) ⬇️
gitlab/v4/objects/sidekiq.py 82.60% <0.00%> (-17.40%) ⬇️
gitlab/v4/objects/labels.py 82.97% <0.00%> (-17.03%) ⬇️
gitlab/v4/objects/commits.py 80.26% <0.00%> (-14.48%) ⬇️
gitlab/v4/objects/snippets.py 83.67% <0.00%> (-14.29%) ⬇️
... and 24 more

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, interesting, another API quirk I guess. Should we be testing this somewhere? I guess it doesn't make sense to spend time on it.

There are occasions where a GitLab `list()` call does not return the
`x-per-page` header. For example the listing of custom attributes.

Update the type-hints to reflect that.
@JohnVillalovos
Copy link
Member Author

Huh, interesting, another API quirk I guess. Should we be testing this somewhere? I guess it doesn't make sense to spend time on it.

I'm not sure how much value in testing for this, but I can if you want.

@nejch nejch enabled auto-merge February 5, 2022 20:06
@nejch
Copy link
Member

nejch commented Feb 5, 2022

Huh, interesting, another API quirk I guess. Should we be testing this somewhere? I guess it doesn't make sense to spend time on it.

I'm not sure how much value in testing for this, but I can if you want.

Probably not :) just another weird one!

@nejch nejch merged commit 5e19694 into main Feb 5, 2022
@nejch nejch deleted the jlvillal/easy branch February 5, 2022 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants