8000 Make linter happy · codders/flask-api@1ceda54 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ceda54

Browse files
coddersauvipy
authored andcommitted
Make linter happy
Fix python version Update ubuntu version
1 parent 873ea1b commit 1ceda54

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,30 @@ name: Tests
33
#############################
44
# Start the job on all push #
55
#############################
6-
on:
7-
push:
8-
branches:
9-
- 'main'
10-
pull_request:
6+
on: [push, pull_request]
117

128
jobs:
139
tests:
1410
name: Python ${{ matrix.python-version }}
15-
runs-on: ubuntu-xenial
11+
runs-on: ubuntu-20.04
1612
environment: test
1713

1814
strategy:
1915
matrix:
20-
python-version: ["3.7", "3.8"]
16+
python-version: ["3.8", "3.9"]
2117

2218
steps:
2319
- uses: actions/checkout@v3
2420
- name: Set up Python ${{ matrix.python-version }}
2521
uses: actions/setup-python@v4
2622
with:
2723
python-version: ${{ matrix.python-version }}
28-
- uses: browser-actions/setup-chrome@latest
29-
with:
30-
chrome-version: stable
3124
- name: Install dependencies
3225
run: |
3326
pip install --upgrade pip
3427
pip install pipenv
3528
python --version; pip --version; pipenv --version
36-
pipenv run pip install flask=2.3.2
29+
pipenv run pip install flask==2.3.2
3730
- name: Run tests
3831
run: |
3932
make check

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ check: flake8 ## Run linters and static analysis
5252

5353
.PHONY: flake8
5454
flake8: install
55-
$(FLAKE8) flask_api --ignore=E128,E501 --exclude=__init__.py
55+
$(FLAKE8) flask_api --ignore=E128,E501,W503 --exclude=__init__.py
5656

5757
# TESTS #######################################################################
5858

flask_api/renderers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def render(self, data, media_type, **options):
9696

9797
# Determine the allowed methods on this view.
9898
if hasattr(flask, 'globals') and \
99-
hasattr(flask.globals, 'request_ctx'):
99+
hasattr(flask.globals, 'request_ctx'):
100100
# update session for Flask >= 2.2
101101
ctx = flask.globals.request_ctx._get_current_object()
102102
else: # pragma: no cover

0 commit comments

Comments
 (0)
0