Skip to content

Commit

Permalink
run python 3.12 in the build, formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhrysteve committed Apr 2, 2024
1 parent 2a9e786 commit 896202b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Test Coverage

on: ["push", "pull_request"]
Expand All @@ -12,18 +13,18 @@ jobs:
#
# Please bump to the latest unreleased candidate
# when you come across this and have a moment to spare!
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@master
- name: set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U tox tox-gh-actions
pip install -r requirements-tox.txt -r requirements-test.txt
- name: Run tox
run: |
tox -e py
- uses: actions/checkout@master
- name: set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U tox tox-gh-actions
pip install -r requirements-tox.txt -r requirements-test.txt
- name: Run tox
run: |
tox -e py
6 changes: 3 additions & 3 deletions marshmallow_jsonschema/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from pkg_resources import get_distribution
from importlib.metadata import version

__version__ = get_distribution("marshmallow-jsonschema").version
__version__ = version("marshmallow-jsonschema")
__license__ = "MIT"

from .base import JSONSchema
from .exceptions import UnsupportedValueError

__all__ = ("JSONSchema", "UnsupportedValueError")
__all__ = ("JSONSchema", "UnsupportedValueError", "__version__", "__license__")
6 changes: 3 additions & 3 deletions marshmallow_jsonschema/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ def get_properties(self, obj) -> typing.Dict[str, typing.Dict[str, typing.Any]]:

for field_name, field in fields_items_sequence:
schema = self._get_schema_for_field(obj, field)
properties[
field.metadata.get("name") or field.data_key or field.name
] = schema
properties[field.metadata.get("name") or field.data_key or field.name] = (
schema
)

return properties

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tool.black]
target-version = ['py39', 'py310']
target-version = ['py39', 'py310', 'py311', 'py312']
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def read(fname):
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
test_suite="tests",
)

0 comments on commit 896202b

Please sign in to comment.