17 Commits
Author SHA1 Message Date
Jirka Borovec 13e178a3ab Set line length to 120 characters (#2599) 2023-07-13 17:37:20 +02:00
Enrico MinackandJohn T. Wodder II 0177f7c513 Make datetime objects timezone-aware (#2565)
Comparing timestamps returned by the API with naive datetime objects (without timezone information) will raise an error. Add `tzinfo=datetime.timezone.utc` to your datetime instance.

Co-authored-by: John T. Wodder II <git@varonathe.org>
2023-06-28 21:47:48 +02:00
秋葉 6570892a79 Feat: Add html_url property in Team Class. (#1983)
Fixes: #1942
2021-10-13 15:57:07 +11:00
Steve Kowalik e113e37de1 Add pyupgrade to pre-commit configuration (#1783)
To help us switch to f-strings and other 3.6+ changes, add pyupgrade to
our pre-commit configuration to keep the codebase clean.
2020-12-15 14:07:33 +11:00
Steve Kowalik 23f475393d Filter the DeprecationWarning in Team tests (#1728)
With 1c55be5174 merged, Team.set_repo_permission() now raises a
DeprecationWarning, so filter it until the method is removed.
2020-10-28 15:03:46 +11:00
Andy Grunwald 1c55be5174 Fix #1507: Add new Teams: Add or update team repository endpoint (#1509)
* Add new Team.update_team_repository()

* Mark Team.set_repo_permission() as deprecated

 Fixes #1507
2020-10-28 13:43:35 +11:00
Tal Machani 749e8d359a Add method get_team_membership for user to Team (#1658)
* - Add method get_team_membership for user

* add typing get_team_membership for member

Fixes #1657
2020-08-18 17:45:01 +10:00
Steve Kowalik 291c46303d Drastically increase coverage by checking repr() (#1521)
A lot of our missing coverage is caused by not checking repr(), which is
trivial enough to test against -- do so, and also clean up existing repr
tests to look the same by calling repr(). Where it was trivial, add a
few assertions about missing attributes.
2020-05-19 11:54:07 +10:00
Adrian Bridgett 219bde53d3 Add "get_repo_permission" to Team class (#1416)
* Add "get_repo_permission" to Team class

* second attempt:
- accept repo name or repo object
- return github.Permissions.Permissions object
- try and following CONTRIBUTING.md better

* add missing import to tests
patch replay data with permission data

* assert a specific permission rather than just the type

Fixes #1415
2020-03-13 11:01:16 +11:00
Steve Kowalik 784deb5f68 Run black over the entire tree (#1386)
It's been a while since black was run over the entire tree, and since CI
still doesn't check it, we can get behind.
2020-02-11 10:37:25 +11:00
Steve Kowalik 37122cf2bb Switch to no argument super() (#1361)
Now that Python 2 support is gone, we can switch to no argument super()
rather than calling our superclass by name.
2020-01-21 21:15:22 +11:00
Gilad Shefer eacabb2fb9 Added nested teams and parent (#1348)
* Added nested teams and parent

- Added github.Team.Team.get_teams() to get nested teams.
- Added github.Team.Team.parent which points to the parent team.

Fixes #1337
2020-01-12 10:17:54 +10: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
Adam Baratz ec3c8d7b3b Add support for team discussions (#1246) (#1249)
* Add support for team discussions (#1246)

* Make a TeamDiscussion completeable
2019-10-31 21:19:10 +11: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
TechnicalPirate 78d283b9b5 Updated setup.py to exclude tests (#1031)
# Problem #
The `.whl` available on PyPi for this repository contains its entire `tests` submodule. 

The total size of the `pygithub` module is less than `1mb` without tests and `>23mb` with. 

Previous discussions on this topic indicated the removal of tests would be accepted if someone created a pull request to do so: https://github.com/PyGithub/PyGithub/issues/672 

This is that pull request! 😄

# Solution/Implementation # 

- Moved "tests" to root of the repository ( outside the package ) 
    - Added `tests.` module path to the imports in `AllTests.py`
- Updated `setup.py`
    - Removed `package_data` from product
    - Removed "tests" from packages definition
    - Repointed `test_suite` to new location
- Updated `travis.yml`
    - Added conditional ( if not `py2.7` ) conversion of code to `py3`

_... apologies for all the failed build spam below - new to working with Travis CI / had some gotcha moments!_
2019-04-16 11:45:02 +08:00