Skip to content

Commit 52e818e

Browse files
committed
run python 3.12 in the build, formatting tweaks
1 parent 2a9e786 commit 52e818e

File tree

7 files changed

+28
-25
lines changed

7 files changed

+28
-25
lines changed

.github/workflows/black.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Lint
23

34
on: [push, pull_request]

.github/workflows/build.yml

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Test Coverage
23

34
on: ["push", "pull_request"]
@@ -12,18 +13,18 @@ jobs:
1213
#
1314
# Please bump to the latest unreleased candidate
1415
# when you come across this and have a moment to spare!
15-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1617
steps:
17-
- uses: actions/checkout@master
18-
- name: set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -U tox tox-gh-actions
26-
pip install -r requirements-tox.txt -r requirements-test.txt
27-
- name: Run tox
28-
run: |
29-
tox -e py
18+
- uses: actions/checkout@master
19+
- name: set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -U tox tox-gh-actions
27+
pip install -r requirements-tox.txt -r requirements-test.txt
28+
- name: Run tox
29+
run: |
30+
tox -e py

.github/workflows/mypy.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Lint
23

34
on:
@@ -10,9 +11,9 @@ jobs:
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Setup Python
13-
uses: actions/setup-python@v1
14+
uses: actions/setup-python@v5
1415
with:
15-
python-version: 3.11.2
16+
python-version: '3.11'
1617
architecture: x64
1718
- name: Checkout
1819
uses: actions/checkout@v1

marshmallow_jsonschema/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from pkg_resources import get_distribution
1+
from importlib.metadata import version
22

3-
__version__ = get_distribution("marshmallow-jsonschema").version
3+
__version__ = version("marshmallow-jsonschema")
44
__license__ = "MIT"
55

66
from .base import JSONSchema
77
from .exceptions import UnsupportedValueError
88

9-
__all__ = ("JSONSchema", "UnsupportedValueError")
9+
__all__ = ("JSONSchema", "UnsupportedValueError", "__version__", "__license__")

marshmallow_jsonschema/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ def get_properties(self, obj) -> typing.Dict[str, typing.Dict[str, typing.Any]]:
166166

167167
for field_name, field in fields_items_sequence:
168168
schema = self._get_schema_for_field(obj, field)
169-
properties[
170-
field.metadata.get("name") or field.data_key or field.name
171-
] = schema
169+
properties[field.metadata.get("name") or field.data_key or field.name] = (
170+
schema
171+
)
172172

173173
return properties
174174

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tool.black]
2-
target-version = ['py39', 'py310']
2+
target-version = ['py39', 'py310', 'py311', 'py312']

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ def read(fname):
6060
"License :: OSI Approved :: MIT License",
6161
"Natural Language :: English",
6262
"Programming Language :: Python :: 3",
63-
"Programming Language :: Python :: 3.6",
64-
"Programming Language :: Python :: 3.7",
6563
"Programming Language :: Python :: 3.8",
6664
"Programming Language :: Python :: 3.9",
6765
"Programming Language :: Python :: 3.10",
66+
"Programming Language :: Python :: 3.11",
67+
"Programming Language :: Python :: 3.12",
6868
],
6969
test_suite="tests",
7070
)

0 commit comments

Comments
 (0)