Skip to content
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

Correctly deal when PaginatedList's data is a dict #2084

Merged

Conversation

s-t-e-v-e-n-k
Copy link
Collaborator

When calculating totalCount for a PaginatedList, if a Link header is not
in the returned data, we use len() to calculate the number of items.
PullRequest.get_review_requests() actually returns a dictionary, which
neatly defeats this naive method. Peer inside the dictionary in this
case, and add a test case.

Fixes #2053

When calculating totalCount for a PaginatedList, if a Link header is not
in the returned data, we use len() to calculate the number of items.
PullRequest.get_review_requests() actually returns a dictionary, which
neatly defeats this naive method. Peer inside the dictionary in this
case, and add a test case.

Fixes PyGithub#2053
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2021

Codecov Report

Merging #2084 (6f66d97) into master (0422110) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2084   +/-   ##
=======================================
  Coverage   98.87%   98.87%           
=======================================
  Files         108      108           
  Lines       11107    11109    +2     
=======================================
+ Hits        10982    10984    +2     
  Misses        125      125           
Impacted Files Coverage Δ
github/PaginatedList.py 99.23% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0422110...6f66d97. Read the comment docs.

@s-t-e-v-e-n-k s-t-e-v-e-n-k merged commit 93b92cd into PyGithub:master Oct 20, 2021
@Justintime50
Copy link

When is this fix getting released? This is a nasty bug that I have to code around in one of my apps. There appear to be dozens of commits on the master branch that have not yet been released. Anything we can do to speed this along?

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.

Bug in calculating totalCount of review requests
3 participants