Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Jan 3, 2025
1 parent 58e1a00 commit e6b08bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ repos:
- id: validate-pyproject

- repo: https://github.com/crate-ci/typos
rev: codespell-dict-v0.5.0
rev: v1.29.4
hooks:
- id: typos
args: [--force-exclude] # omit --write-changes

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.8.5
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
Expand All @@ -29,7 +29,6 @@ repos:
exclude: ^tests|^docs|_napari_plugin|widgets
additional_dependencies:
- pydantic>=2.10
- pydantic-compat
- xsdata==24.2.1
- Pint
- types-lxml
12 changes: 2 additions & 10 deletions src/xsdata_pydantic_basemodel/compat.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import dataclasses as dc
from collections.abc import Iterator
from contextlib import suppress
from typing import (
TYPE_CHECKING,
Any,
Callable,
ClassVar,
Generic,
Optional,
TypeVar,
)
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generic, Optional, TypeVar

from pydantic import BaseModel, Field
from pydantic_core import core_schema as cs
Expand Down Expand Up @@ -133,7 +125,7 @@ def validator(value: Any) -> Any:

def _make_get_core_schema(validator: Callable) -> Callable:
def get_core_schema(*args: Any) -> cs.PlainValidatorFunctionSchema:
return cs.general_plain_validator_function(validator)
return cs.with_info_plain_validator_function(validator)

return get_core_schema

Expand Down

0 comments on commit e6b08bf

Please sign in to comment.