Skip to content

Commit 6db6a01

Browse files
committed
Update GitHub actions Tox tests
Update to modern Python versions and GitHub actions Fix a couple Flake8 findings
1 parent d2ea899 commit 6db6a01

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: [ '2.7', '3.7' ]
17+
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020
- name: Set up Python
21-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install dependencies

agithub/GitHub.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def request(self, method, url, bodyData, headers):
114114
self.sleep_until_more_ratelimit()
115115
else:
116116
data = content.processBody()
117-
if self.paginate and type(data) == list:
117+
if self.paginate and type(data) is list:
118118
data.extend(
119119
self.get_additional_pages(method, bodyData, headers))
120120
return status, data
@@ -129,7 +129,7 @@ def get_additional_pages(self, method, bodyData, headers):
129129
'{}'.format(url))
130130

131131
status, data = self.request(method, url, bodyData, headers)
132-
if type(data) == list:
132+
if type(data) is list:
133133
data.extend(self.get_additional_pages(method, bodyData, headers))
134134
return data
135135
elif (status == 403 and self.no_ratelimit_remaining()

tox.ini

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[tox]
2-
envlist = py27, py37, flake8
2+
envlist = py38, py39, py310, py311, py312, flake8
33

44
[gh-actions]
55
python =
6-
2.7: py27
7-
3.7: py37, flake8
6+
3.8: py38
7+
3.9: py39
8+
3.10: py310
9+
3.11: py311
10+
3.12: py312, flake8
811

912
[testenv:flake8]
1013
basepython = python

0 commit comments

Comments
 (0)