Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10']
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
Expand All @@ -29,13 +29,13 @@ jobs:
if: github.event_name == 'push'
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.13'
- name: Install dependencies
run: python -m pip install build
- name: Build a binary wheel and a source tarball
Expand Down
15 changes: 6 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
default_language_version:
python: python3.7

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v2.4.0"
rev: "v5.0.0"
hooks:
# General file-formatting
- id: trailing-whitespace
Expand All @@ -20,26 +17,26 @@ repos:
# Git-related
- id: check-merge-conflict

- repo: https://gitlab.com/pycqa/flake8
rev: "3.7.9"
- repo: https://github.com/pycqa/flake8
rev: "7.2.0"
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear # Finds common application design anti-patterns

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.4.2"
rev: "v1.10.0"
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/mirrors-isort
rev: "v4.3.21"
rev: "v5.10.1"
hooks:
- id: isort
additional_dependencies:
- toml # Required for loading config from pyproject.toml

- repo: https://github.com/ambv/black
rev: "19.10b0"
rev: "25.1.0"
hooks:
- id: black
627 changes: 357 additions & 270 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "warlock"
version = "2.0.1"
description = "Python object model built on JSON schema and JSON patch."
readme = "README.md"
authors = ["Brian Waldon <bcwaldon@gmail.com>"]
maintainers = ["Jan Willhaus <mail@janwillhaus.de>"]
maintainers = ["Stephen Finucane <stephen@that.guru>"]
homepage = "http://github.com/bcwaldon/warlock"
repository = "http://github.com/bcwaldon/warlock"
license = "Apache-2.0"
Expand All @@ -17,18 +21,19 @@ classifiers = [
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
{ include = "warlock" },
]

[tool.poetry.dependencies]
python = "^3.7"
python = ">=3.9"
jsonschema = "^4"
jsonpatch = "^1"

Expand All @@ -51,7 +56,3 @@ exclude = '''
[tool.isort]
known_third_party = ["jsonpatch","jsonschema"]
known_first_party=["warlock"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
skipsdist = True
envlist = py37,py38,py39,py310
skipsdist = true
envlist = py3

[testenv]
skip_install = true
Expand Down
3 changes: 2 additions & 1 deletion warlock/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

import copy

from . import model
from jsonschema.validators import validator_for

from . import model


def model_factory(schema, base_class=model.Model, name=None, resolver=None):
"""Generate a model class based on the provided JSON Schema
Expand Down
2 changes: 1 addition & 1 deletion warlock/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

""" List of errors used in warlock """
"""List of errors used in warlock"""


class InvalidOperation(RuntimeError):
Expand Down