Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Commit bdf3957

Browse files
authored
Merge pull request #247 from snok/sondrelg/maintenance
Bump patch version
2 parents 3d3b69b + fc16225 commit bdf3957

File tree

8 files changed

+282
-264
lines changed

8 files changed

+282
-264
lines changed

.github/workflows/testing.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,12 @@ jobs:
3434
source .venv/bin/activate
3535
pre-commit run --all-files
3636
37-
get-python-versions:
38-
runs-on: ubuntu-latest
39-
outputs:
40-
python-matrix: ${{ steps.get-python-versions-action.outputs.latest-python-versions }}
41-
steps:
42-
- uses: snok/latest-python-versions@v1
43-
id: get-python-versions-action
44-
with:
45-
min-version: 3.6
46-
include-prereleases: false
47-
4837
test:
49-
needs: [get-python-versions]
5038
runs-on: ubuntu-latest
5139
strategy:
5240
fail-fast: false
5341
matrix:
54-
python-version: ${{ fromJson(needs.get-python-versions.outputs.python-matrix) }}
42+
python-version: [ "3.6", "3.7", "3.8" , "3.9", "3.10" ]
5543
django-version: [ "2.2", "3.0", "3.1", "3.2" ]
5644
steps:
5745
- uses: actions/checkout@v2
@@ -62,7 +50,7 @@ jobs:
6250
id: poetry-cache
6351
with:
6452
path: ~/.local
65-
key: key-0
53+
key: key-1
6654
- name: Install poetry
6755
uses: snok/install-poetry@v1
6856
with:
@@ -72,22 +60,24 @@ jobs:
7260
id: cache-venv
7361
with:
7462
path: .venv
75-
key: ${{ hashFiles('**/poetry.lock') }}-0
63+
key: ${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-1
7664
- run: |
7765
pip install virtualenv
7866
virtualenv .venv
7967
source .venv/bin/activate
8068
pip install pip setuptools wheel -U
8169
poetry install --no-interaction --no-root
8270
if: steps.cache-venv.outputs.cache-hit != 'true'
83-
- run: |
71+
- name: Install django version
72+
run: |
8473
source .venv/bin/activate
8574
pip install "Django==${{ matrix.django-version }}"
75+
- run: |
76+
source .venv/bin/activate
77+
pip install coverage[toml]
8678
- name: Install DRF 3.11 on Django 2.2
8779
if: matrix.django-version == '2.2'
8880
run: pip install "djangorestframework==3.11.1"
89-
- run: pip install coverage
90-
if: matrix.python-version == '3.10'
9181
- name: Run tests
9282
run: |
9383
source .venv/bin/activate

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 21.7b0
3+
rev: 21.12b0
44
hooks:
55
- id: black
66
args: ['--quiet']
@@ -28,16 +28,16 @@ repos:
2828
'flake8-pytest-style',
2929
]
3030
- repo: https://github.com/asottile/pyupgrade
31-
rev: v2.24.0
31+
rev: v2.29.1
3232
hooks:
3333
- id: pyupgrade
3434
args: ["--py36-plus"]
3535
- repo: https://github.com/pycqa/isort
36-
rev: 5.9.3
36+
rev: 5.10.1
3737
hooks:
3838
- id: isort
3939
- repo: https://github.com/pre-commit/mirrors-mypy
40-
rev: 'v0.910'
40+
rev: 'v0.920'
4141
hooks:
4242
- id: mypy
4343
additional_dependencies: [django, djangorestframework, inflection, openapi-spec-validator, prance, pyYAML, django-stubs, djangorestframework-stubs, drf_yasg, drf-spectacular, types-PyYAML]

openapi_tester/schema_tester.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from django.core.exceptions import ImproperlyConfigured
77
from rest_framework.response import Response
88

9-
from openapi_tester import OpenAPISchemaError
109
from openapi_tester import type_declarations as td
1110
from openapi_tester.constants import (
1211
INIT_ERROR,
@@ -18,7 +17,7 @@
1817
VALIDATE_ONE_OF_ERROR,
1918
VALIDATE_WRITE_ONLY_RESPONSE_KEY_ERROR,
2019
)
21-
from openapi_tester.exceptions import DocumentationError, UndocumentedSchemaSectionError
20+
from openapi_tester.exceptions import DocumentationError, OpenAPISchemaError, UndocumentedSchemaSectionError
2221
from openapi_tester.loaders import DrfSpectacularSchemaLoader, DrfYasgSchemaLoader, StaticSchemaLoader
2322
from openapi_tester.utils import lazy_combinations, normalize_schema_section
2423
from openapi_tester.validators import (

0 commit comments

Comments
 (0)