Steve Kowalik
b8dad9817e
Clean up a lot of pyflakes warnings ( #1153 )
...
Clean up unused imports or unused variables to mostly silence pyflakes.
We aren't quite yet in a place where we can run it via Travis, but baby
steps.
2019-07-02 18:06:09 +10:00
Steve Kowalik
ec17761008
Use total_count from data in PaginatedList ( #963 )
...
When there is no link header sent, this signifies that this is the only
page of results. If data is empty, or only contains a list of items, we
should count them, but this can be defeated -- if the returned data
contains a total_count key, we should use it. This also uncovered a bug
in the test suite for searching topics.
Closes #960
2018-11-23 17:08:09 +08:00
netsgnut
60a684c5eb
Added missing params to constructor when reversed ( #946 )
...
This PR proposes adding two missing params to constructor in `.reversed`. This preserves the `headers` as well as the `list_item` once cloned.
Fixes #945 .
2018-10-26 15:57:40 +08:00
Wan Liuyang
598bee8193
Fix totalCount for empty response, closes #905
2018-09-18 16:34:38 +08:00
Wan Liuyang
3f0caa4057
Sync copyright header
2018-08-19 10:47:41 +08:00
Wan Liuyang
8a589c9d73
Revert __len__ for PaginatedList to fix the tests, will revisit later
2018-07-10 10:36:30 +08:00
sfdye
8ae2bcb1e6
Implement __len__ for PaginatedList, fixes #579 , closes #433
2018-07-08 11:40:17 +08:00
Joel Koglin
e6eabe9ad0
Calcuate totalCount without iterating PaginatedList ( #820 )
...
This PR #596 seems stale, so I have opened up this one with the requested changes from @sfdye.
This is the code from @Tommos0's [comment][1] with some modification.
There are 2 tests failing. I think this is due to the change in the query string and the cached test data just needs to be refreshed for those tests.
[1]: https://github.com/PyGithub/PyGithub/pull/596#issuecomment-315013949
2018-07-08 10:43:48 +08:00
sfdye
365a0a24d3
Apply fix_headers script to update copyright info
2018-03-17 20:06:16 +08:00
sfdye
58e1ef9ccb
Fix copyright formatting
2018-03-13 22:30:47 +08:00
sfdye
020c136a40
Update doc link in copyright text
2018-03-13 22:07:38 +08:00
Wan Liuyang
8daae1375e
Update doc link for PyPI
2018-03-02 11:37:27 +08:00
Gilad Shefer
5c9c2f7523
Updated PullRequest reviewer request according to API changes ( #690 )
...
https://developer.github.com/changes/2018-01-24-end-thor-preview/
2018-01-26 19:06:09 -08:00
Jannis Gebauer
33334e4345
adding support for the integrations installation endpoint
2017-02-01 10:51:13 +01:00
Peter Buckley
cb0cf0a680
update doc url everywhere ( #420 )
2016-07-12 16:38:02 -04:00
Dan Vanderkam
fb6f3cb3a2
Thread headers through PaginatedList
2015-10-14 11:07:13 -04:00
Eliot Walker
a03f796f01
Fix paginated list handling of 204s
2015-02-06 13:47:14 -08:00
Vincent Jacques
aadc286839
Work-around Issue278
2014-10-07 18:45:30 -07:00
Vincent Jacques
abca7a026e
pep8
...
This is strange, maybe Cygwin's version is stricter.
No time to investigate.
2014-05-04 12:54:05 -07:00
Thialfihar
9a51a61e3f
Make PaginatedList support the search wrapper JSON
...
For /search resources the resulting JSON contains 'total_count' and
'items'. The latter is the list PaginatedList expects, so just
transparently use that list. Everything else works just like other
lists.
Also change __grow()'s visibility to allow PaginatedList to use it
in order to peek at 'total_count', making it available as a property.
2014-02-08 16:45:59 +01:00
Vincent Jacques
f2feb81dae
Add default parameters to greatly reduce code redoundancy
2013-09-06 11:01:32 +02:00
Vincent Jacques
64cf539c83
#193 : Add a param to Requester.requestXxx for request headers
2013-08-23 11:31:01 +02:00
Vincent Jacques
8a2624e3a1
Merge branch 'topic/RememberHeaders' into develop ( #192 )
...
Conflicts:
github/Issue.py
github/MainClass.py
github/PaginatedList.py
github/Repository.py
github/Requester.py
2013-08-22 10:30:14 +02:00
Vincent Jacques
5c475c7683
First review of #192 (pep8, headers... nothing important)
...
./manage.sh check
./manage.sh fix_headers
2013-08-22 10:12:38 +02:00
Vincent Jacques
cbeea79a40
Update readme and doc for #184
2013-08-21 13:12:26 +02:00
Vincent Jacques
6a92d3ed63
Make PaginatedList.reversed return a new list (follow-up #184 )
...
This will avoid surprises if both the list and its reversed version
are iterated.
2013-08-21 13:02:21 +02:00
AKFish
912bec79d2
Update copyright information
2013-08-21 17:45:01 +08:00
AKFish
8a301701db
Remove helper method in PaginatedList.py
2013-08-21 17:25:29 +08:00
AKFish
ed32e78da1
Update Commit.py and GitCommit.py
2013-08-21 15:26:05 +08:00
AKFish
2f31828502
Update RepositoryKey.py
2013-08-21 15:04:34 +08:00
AKFish
b12c4b38c5
Update Tag.py
2013-08-21 13:05:41 +08:00
AKFish
0bc138b490
Change NonCompletableGithubObject without breaking build.
2013-08-21 12:32:41 +08:00
davidbrai
cb03b9e7d1
bugfix: returning real list instead of generator
...
Changed reversed(content) to content[::-1] in order to return
a real list and not a generator.
The code in PaginatedListBase.__grow does an iteration over
newElements when using `+=` and then returns them.
When using a generator, newElements would be empty when they are returned.
2013-08-03 16:49:10 +03:00
davidbrai
271f3f301e
bug fix: empty nextUrl if no next/prev
...
Fixes a bug introduced in the previous commits.
Now testing a case where no lastUrl is returned.
Also fixing a regression where nextUrl wasn't erased properly.
2013-08-02 18:59:11 +03:00
davidbrai
da6bd8c827
remove print #oops
2013-08-02 18:28:48 +03:00
davidbrai
ef4cf44ebd
support reverse iteration in PaginatedList
...
This uses the 'last' and 'prev' links in the HTTP headers.
The usage is repo.get_issues().reversed
2013-08-02 18:20:39 +03:00
Vincent Jacques
06a3d87098
Change source file header format
2013-07-13 19:03:53 +02:00
Vincent Jacques
56309b90f2
Run the script added in previous commit
2013-07-13 11:10:00 +02:00
davidbrai
8d22935180
bugfix: using custom per_page in repo.get_comments
2013-06-19 00:36:03 +03:00
Vincent Jacques
db5560bd65
Add a script to check copyrights with git log. And fix copyrights.
2013-03-29 16:54:15 +01:00
Vincent Jacques
e25a6a49d1
Add Github.per_page to tweak PaginatedList (Issue #145 )
2013-03-14 12:01:41 +01:00
Vincent Jacques
7a415fda66
Change home page
2013-02-16 21:19:49 +01:00
Vincent Jacques
0bd00452e7
Improve documentation
2013-02-16 21:15:17 +01:00
Vincent Jacques
680490a6d8
Merge branch 'develop' into topic/ExperimentOnDocumentation
...
Conflicts:
ReadMe.md
doc/ChangeLog.md
doc/ReferenceOfApis.md
doc/ReferenceOfClasses.md
github/AuthenticatedUser.py
github/Authorization.py
github/CommitComment.py
github/ContentFile.py
github/Download.py
github/Gist.py
github/GistComment.py
github/GitRef.py
github/Github.py
github/Hook.py
github/Issue.py
github/IssueComment.py
github/Label.py
github/Milestone.py
github/PullRequest.py
github/PullRequestComment.py
github/Repository.py
github/RepositoryKey.py
github/Team.py
github/UserKey.py
setup.py
2013-02-16 19:57:13 +01:00
Vincent Jacques
e9be857089
Rename methods in Requester
2013-02-05 19:39:03 +01:00
Bill Mill
753cb0e78a
fix failing get_page function
...
* if firstParams was None, PaginatedList was calling dict(None)
which fails with a TypeError. If firstParams is None, just use
an empty tuple, which dict() handles properly
2013-01-27 17:38:44 -05:00
Vincent Jacques
d99b7ef577
Mark urls to be completed
2012-12-29 08:28:15 +01:00
Vincent Jacques
889e57df22
Improve docs
2012-12-29 08:13:22 +01:00
Vincent Jacques
9a03610f7b
Use absolute imports. May help with Python 3
2012-11-21 20:13:12 +01:00
Vincent Jacques
a6972c03c3
Fix assertion failure on big integers (issue #116 )
2012-11-20 19:34:55 +01:00