Skip to content

Commit 42f4b6c

Browse files
authored
Merge pull request #1637 from praw-dev/actions_python_version
Actually use the python version matrix
2 parents 95f406c + bb0e006 commit 42f4b6c

File tree

3 files changed

+7
-49
lines changed

3 files changed

+7
-49
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -49,47 +49,6 @@ jobs:
4949
matrix:
5050
os: [macOS-latest, ubuntu-latest, windows-latest]
5151

52-
lint-multi-python:
53-
name: Lint Python ${{ matrix.python-version }}
54-
runs-on: ubuntu-latest
55-
steps:
56-
- uses: actions/checkout@v2
57-
- uses: actions/setup-python@v1
58-
with:
59-
python-version: 3.x
60-
- uses: actions/cache@v1
61-
with:
62-
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
63-
path: ~/.cache/pip
64-
restore-keys: |
65-
v0-${{ runner.os }}-pip-lint-
66-
v0-${{ runner.os }}-pip-
67-
- name: Install dependencies
68-
run: |
69-
python -m pip install --upgrade pip
70-
pip install .[lint]
71-
- name: Check other phrase usages
72-
run: python ./tools/static_word_checks.py
73-
- name: Check documentation
74-
run: python ./tools/check_documentation.py
75-
- name: Check docstrings
76-
run: python ./tools/check_docstring.py
77-
- name: Run black
78-
run: black --check --verbose .
79-
- name: Run flake8
80-
run: flake8 --exclude docs --statistics
81-
- name: Run flynt
82-
run: flynt -vdf -tc -ll 1000 .
83-
- name: Run isort
84-
run: isort -cv .
85-
- name: Run pydocstyle
86-
run: pydocstyle praw
87-
- name: Run sphinx
88-
run: sphinx-build --keep-going docs/ /tmp/foo
89-
strategy:
90-
matrix:
91-
python-version: [3.6, 3.7, 3.8, 3.9]
92-
9352
test-multi-os:
9453
name: Test ${{ matrix.os }}
9554
runs-on: ${{ matrix.os }}
@@ -122,7 +81,7 @@ jobs:
12281
- uses: actions/checkout@v2
12382
- uses: actions/setup-python@v1
12483
with:
125-
python-version: 3.x
84+
python-version: ${{ matrix.python-version }}
12685
- uses: actions/cache@v1
12786
with:
12887
key: v0-${{ runner.os }}-pip-test-${{ hashFiles('setup.py') }}

.pre-commit-config.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
default_language_version:
2-
python: python3.7
31
fail_fast: true
42
repos:
5-
- hooks:
6-
- id: black
7-
repo: https://github.com/ambv/black
8-
rev: stable
3+
- hooks:
4+
- id: black
5+
language_version: python3
6+
repo: https://github.com/psf/black
7+
rev: stable

praw/reddit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def request(self, *args, **kwargs):
369369
def _check_for_async(self):
370370
if self.config.check_for_async:
371371
in_async = False
372-
if sys.version_info >= (3, 7, 0):
372+
if sys.version_info >= (3, 7, 0): # pragma: no cover
373373
try:
374374
asyncio.get_running_loop()
375375
in_async = True

0 commit comments

Comments
 (0)