Commit Graph
33 Commits
Author SHA1 Message Date
Alice GIRARDandLiuyang Wan 91433fe925 Type stubs for mypy (#1231)
* First attempt at stubs

* fix AuthenticatedUser.piy

* fix PullRequest.piy

* fix Authorization.piy

* fix Branch.piy

* fix Clones.piy

* fix Commit.piy

* fix CommitCombinedStatus.piy

* fix CommitComment.piy

* fix CommitStatus.piy

* fix ContentFile.piy

* fix Download.piy

* fix Event.piy

* fix File.piy

* fix Gist.piy

* fix GistComment.piy

* fix GistFile.piy

* fix GitAuthor.piy

* fix GitBlob.piy

* fix GitCommit.piy

* fix GitRef.piy

* fix GitRelease.piy

* renamed stubs into pyi files

* fix Notification

* fix Repository

* fix GitReleaseAsset

* fix GitTag

* fix GitTree

* fix GitTreeElement

* fix GithubException

* fix GithubObject

* fix GitignoreTemplate

* fix HookDescription

* fix HookResponse

* fix InputGitAuthor

* fix Installation

* fix InstallationAuthorization

* fix Invitation

* fix Issue

* fix IssueComment

* Fix random issues found while testing

* fix IssuePullRequest

* fix Label

* fix License

* fix Migration

* fix Milestone

* fix NamedUser

* fix NotificationSubject

* fix Organization

* fix PaginatedList

* fix Path

* fix Permissions

* fix Plan

* fix Project

* fix ProjectCard

* fix ProjectColumn

* fix PullRequestComment

* fix PullRequestMergeStatus

* fix PullRequestPart

* fix PullRequestReview

* fix Rate

* fix RateLimit

* fix Reaction

* fix Referrer

* fix RepositoryKey

* fix RequiredPullRequestReviews

* fix RequiredStatusChecks

* fix SourceImport

* fix Stargazer

* fix StatsCodeFrequency

* fix StatsCommitActivity

* fix StatsContributor

* fix Tag

* fix Team

* fix Topic

* fix UserKey

* fix MainClass

* fix Requester

* added stubs for View

* added stubs for Membership

* various syntax errors

* silence mypy noise

* keeping track of recent changes

* black + isort

Co-authored-by: Liuyang Wan <lwan@zendesk.com>
2020-03-22 19:33:23 +08:00
Steve Kowalik b7894ea00c Drop Python 2 support (#1329)
With the Python 2 deadline gone, it's time to move with the times and
switch to Python 3 only.
2020-01-06 18:01:38 +11:00
Wan Liuyang 6ceb9e9a15 Apply black to whole codebase (#1303) 2019-12-10 17:14:33 +08:00
Olof-Joachim Frahm (欧雅福) 020fbebcaf Jump from notifications to related PRs/issues. (#1168)
* Jump from notifications to related PRs/issues.

* Add test case for jumping to related PRs/issues.

Also another method to get notifications scoped to a repository,
otherwise it's hard to keep out sensitive information from the test
cases.
2019-09-22 18:59:21 +10:00
Steve Kowalik dc2f2ad8cb Switch to using six (#1189)
With the Python 2.7 deadline fast approaching, modernize the codebase
making use of the modernize module to switch to using six, as well as
other upcoming features, such as absolute imports . Stop using 2to3
for Travis, yay!
2019-08-05 14:06:19 +10:00
Alice GIRARD 0a10d7cdf0 Mark notification as read (#932)
Wraps the parts of the notification API that allows the user to mark notifications as read.
New methods are : 
 
- Notification.mark_as_read : marks a single notification thread as read
- Repository.mark_notifications_as_read : marks all the notifications for a given repository as read
- AuthenticatedUser.mark_notifications_as_read : marks all the notifications as read

Aims to fix : https://github.com/PyGithub/PyGithub/issues/571 and simply uses the APIs described on this page : https://developer.github.com/enterprise/11.10.340/v3/activity/notifications/

A weird thing I noticed doing this is that Repository.notifications_url doesn't seem to be usable directly. I used Repository.url + "/notifications" instead.
2018-10-19 07:24:45 +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
Jannis Gebauer 8571d87c77 adds a nicer __repr__ 2016-09-08 10:25:48 +02:00
Peter Buckley cb0cf0a680 update doc url everywhere (#420) 2016-07-12 16:38:02 -04: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
Vincent Jacques 597e123029 Factorize the creation of attributes (preparation for #195) 2013-09-12 09:27:25 +02:00
Vincent Jacques 4a5009741a Use ValuedAttribute and NotSet.value (preparation for #195) 2013-09-12 00:40:27 +02:00
Vincent Jacques c0dae31a97 Add many missing attributes 2013-09-06 17:14:59 +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
AKFish 912bec79d2 Update copyright information 2013-08-21 17:45:01 +08:00
AKFish 3c1d17cd64 Update Repository.py 2013-08-21 17:13:03 +08:00
AKFish 6cb6e8d232 Update Notification.py 2013-08-21 16:58:25 +08:00
AKFish ca6189c3c9 Change CompletableGithubObject.__init__ without breaking build. 2013-08-21 14:49:20 +08:00
AKFish 12387505e2 Update Notification.py 2013-08-21 14:05:10 +08:00
Vincent Jacques 34f45427da Be explicit about test coverage lacking in Notification.py 2013-08-19 14:07:35 +02:00
Vincent Jacques 06a3d87098 Change source file header format 2013-07-13 19:03:53 +02:00
Vincent Jacques d0002b7a3c Fix pep8 and copyrights 2013-06-18 22:35:46 +02:00
martinqt dd13f2b4bc Don't think this anchor is needed 2013-06-04 15:33:13 +02:00
martinqt 970bc6146c Update Notification 2013-06-02 14:45:00 +02: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 1bb05fef01 Respect pep 8 2013-03-22 17:52:00 +01:00
Vincent Jacques da6bbdb694 Merge branch 'topic/Notifications' into develop 2013-03-19 23:14:29 +01:00
Vincent Jacques 0901df1a2b Improve test coverage (pull #148) 2013-03-19 22:07:42 +01:00
Vincent Jacques f25c54e1d4 Fix documentation (pull #148)
I had to separate class NotificationSubject in its own file, to cope
with my basic doc generation.
2013-03-19 21:27:34 +01:00
Peter Golm 6a3a384fd0 this fixes #108 2013-03-16 17:28:56 +01:00