Skip to content

Commit 3a22e9c

Browse files
authored
0.10.0 v2 (#135)
* drop python 3.8 * add python 3.12 and 3.13 * bump UIs * migrate to ruff
1 parent bd04d36 commit 3a22e9c

File tree

16 files changed

+1071
-1026
lines changed

16 files changed

+1071
-1026
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ jobs:
1818
os:
1919
- ubuntu-22.04
2020
python-version:
21-
- '3.8'
2221
- '3.9'
2322
- '3.10'
2423
- '3.11'
24+
- '3.12'
25+
- '3.13'
2526
steps:
2627
- name: 'Set up Python ${{ matrix.python-version }}'
2728
uses: actions/setup-python@v4
@@ -30,12 +31,11 @@ jobs:
3031
- uses: actions/checkout@v3
3132
- run: pip install -U pip setuptools
3233
- run: pip install -r requirements.txt -r requirements-ci.txt
33-
- run: flake8 aiohttp_swagger3 tests examples
34-
- run: isort -q --check --diff aiohttp_swagger3 tests examples
35-
- run: black -q -l 120 --check --diff aiohttp_swagger3 tests examples
34+
- run: ruff format --check
35+
- run: ruff check
3636
- run: mypy aiohttp_swagger3
3737
- run: pytest --cov=aiohttp_swagger3 --cov-report=term-missing tests/
38-
- uses: codecov/codecov-action@v3.1.1
38+
- uses: codecov/codecov-action@v5.3.1
3939

4040
deploy:
4141
name: Deploy
@@ -48,11 +48,11 @@ jobs:
4848
- name: Set up Python
4949
uses: actions/setup-python@v4
5050
with:
51-
python-version: '3.10'
51+
python-version: '3.11'
5252
- name: Install dependencies
5353
run: |
5454
python -m pip install --upgrade pip
55-
pip install build
55+
pip install setuptools build
5656
- name: Build package
5757
run: python -m build
5858
- name: Publish package

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Disable validation
4747
Requirements
4848
============
4949

50-
- python >= 3.8
50+
- python >= 3.9
5151
- aiohttp >= 3.8.0
5252
- pyyaml >= 5.4
5353
- attrs >= 19.3.0

aiohttp_swagger3/rapidoc_ui/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9.3.4
1+
9.3.8

aiohttp_swagger3/rapidoc_ui/rapidoc-min.js

Lines changed: 705 additions & 685 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aiohttp_swagger3/redoc_ui/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.0.0
1+
v2.4.0

aiohttp_swagger3/redoc_ui/redoc.standalone.js

Lines changed: 317 additions & 291 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aiohttp_swagger3/swagger_ui/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.15.5
1+
5.18.3

aiohttp_swagger3/swagger_ui/swagger-ui-bundle.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aiohttp_swagger3/swagger_ui/swagger-ui-standalone-preset.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aiohttp_swagger3/swagger_ui/swagger-ui.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aiohttp_swagger3/ui_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _expand_responses_validator(self, _: "attr.Attribute[str]", value: str) -> N
183183
int(raw_code)
184184
except ValueError:
185185
raise ValueError(
186-
"expandResponses must be either 'all' or " f"comma-separated list of http codes, got '{raw_code}'"
186+
f"expandResponses must be either 'all' or comma-separated list of http codes, got '{raw_code}'"
187187
)
188188

189189
# noinspection PyUnresolvedReferences
Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
[metadata]
2-
description_file = README.rst
1+
[project]
2+
requires-python = ">=3.9"
33

4-
[aliases]
5-
test = pytest
4+
[tool.ruff]
5+
line-length = 120
6+
indent-width = 4
7+
extend-exclude = ["docs"]
68

7-
[flake8]
8-
ignore = E203, E266, E501, W503
9-
max-line-length = 120
10-
select = B, C, E, F, W, T4, B9
9+
target-version = "py312"
1110

12-
[isort]
13-
line_length = 120
14-
multi_line_output = 3
15-
include_trailing_comma = true
16-
known_first_party = aiohttp_swagger3
17-
known_third_party = pytest
11+
[tool.ruff.lint]
12+
select = ["I"]
13+
ignore = ["F"]
1814

19-
[mypy]
15+
fixable = ["I"]
16+
17+
[tool.ruff.format]
18+
quote-style = "double"
19+
indent-style = "space"
20+
skip-magic-trailing-comma = false
21+
line-ending = "auto"
22+
23+
[tool.mypy]
2024
incremental = true
2125
warn_redundant_casts = true
2226
disallow_subclassing_any = true
@@ -33,4 +37,4 @@ disallow_any_decorated = true
3337
disallow_untyped_decorators = true
3438
strict_optional = true
3539
disallow_any_unimported = true
36-
;disallow_any_generics = true
40+
# disallow_any_generics = true

requirements-ci.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
mypy==1.7.1
2-
black==23.11.0
3-
flake8==6.1.0
4-
isort==5.12.0
2+
ruff==0.9.6
53
types-pyyaml==6.0.12.12
64
pytest==7.4.3
75
pytest-xdist==3.5.0

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pathlib
22
import re
3+
34
from setuptools import setup
45

56
BASE = pathlib.Path(__file__).parent
@@ -39,7 +40,6 @@
3940
"License :: OSI Approved :: Apache Software License",
4041
"Intended Audience :: Developers",
4142
"Programming Language :: Python :: 3 :: Only",
42-
"Programming Language :: Python :: 3.8",
4343
"Programming Language :: Python :: 3.9",
4444
"Programming Language :: Python :: 3.10",
4545
"Programming Language :: Python :: 3.11",
@@ -51,6 +51,6 @@
5151
"Framework :: AsyncIO",
5252
"Topic :: Internet :: WWW/HTTP",
5353
],
54-
python_requires=">=3.8",
54+
python_requires=">=3.9",
5555
install_requires=install_requires,
5656
)

tests/test_methods.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ async def handler(request):
9393
return web.json_response()
9494

9595
swagger = swagger_docs()
96-
swagger.add_get("/r", handler, allow_head=False),
97-
swagger.add_head("/r", handler),
98-
swagger.add_put("/r", handler),
99-
swagger.add_patch("/r", handler),
100-
swagger.add_post("/r", handler),
101-
swagger.add_delete("/r", handler),
102-
swagger.add_options("/r", handler),
103-
swagger.add_view("/r2", View),
96+
swagger.add_get("/r", handler, allow_head=False)
97+
swagger.add_head("/r", handler)
98+
swagger.add_put("/r", handler)
99+
swagger.add_patch("/r", handler)
100+
swagger.add_post("/r", handler)
101+
swagger.add_delete("/r", handler)
102+
swagger.add_options("/r", handler)
103+
swagger.add_view("/r2", View)
104104

105105
client = await aiohttp_client(swagger._app)
106106

tox.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[tox]
2-
envlist = py3{8,9,10,11}
2+
envlist = py3{9,10,11,12,13}
33

44
[testenv]
55
deps =
66
-r requirements.txt
77
-r requirements-ci.txt
88
commands =
9-
flake8 aiohttp_swagger3 tests examples
10-
isort -q --check --diff aiohttp_swagger3 tests examples
11-
black -q -l 120 --check --diff aiohttp_swagger3 tests examples
9+
ruff format --check
10+
ruff check
1211
mypy aiohttp_swagger3
1312
pytest --cov=aiohttp_swagger3 --cov-report=term-missing tests/
1413
skip_install = true

0 commit comments

Comments
 (0)