Skip to content

Commit a98b8b0

Browse files
Bump the python-packages group with 7 updates (#1213)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Hewitt <[email protected]>
1 parent 6d23acd commit a98b8b0

File tree

9 files changed

+31
-43
lines changed

9 files changed

+31
-43
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ build-wasm:
9090

9191
.PHONY: format
9292
format:
93-
ruff --fix $(sources)
93+
ruff check --fix $(sources)
9494
ruff format $(sources)
9595
cargo fmt
9696

9797
.PHONY: lint-python
9898
lint-python:
99-
ruff $(sources)
99+
ruff check $(sources)
100100
ruff format --check $(sources)
101101
$(mypy-stubtest)
102102
griffe dump -f -d google -LWARNING -o/dev/null python/pydantic_core

generate_self_schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
The schema is generated from `python/pydantic_core/core_schema.py`.
66
"""
7+
78
from __future__ import annotations as _annotations
89

910
import decimal

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ features = ["pyo3/extension-module"]
5555

5656
[tool.ruff]
5757
line-length = 120
58+
59+
[tool.ruff.lint]
5860
extend-select = ['Q', 'RUF100', 'C90', 'I']
5961
extend-ignore = [
6062
'E721', # using type() instead of isinstance() - we use this in tests

python/pydantic_core/core_schema.py

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -117,51 +117,39 @@ class CoreConfig(TypedDict, total=False):
117117

118118
class SerializationInfo(Protocol):
119119
@property
120-
def include(self) -> IncExCall:
121-
...
120+
def include(self) -> IncExCall: ...
122121

123122
@property
124-
def exclude(self) -> IncExCall:
125-
...
123+
def exclude(self) -> IncExCall: ...
126124

127125
@property
128-
def mode(self) -> str:
129-
...
126+
def mode(self) -> str: ...
130127

131128
@property
132-
def by_alias(self) -> bool:
133-
...
129+
def by_alias(self) -> bool: ...
134130

135131
@property
136-
def exclude_unset(self) -> bool:
137-
...
132+
def exclude_unset(self) -> bool: ...
138133

139134
@property
140-
def exclude_defaults(self) -> bool:
141-
...
135+
def exclude_defaults(self) -> bool: ...
142136

143137
@property
144-
def exclude_none(self) -> bool:
145-
...
138+
def exclude_none(self) -> bool: ...
146139

147140
@property
148-
def round_trip(self) -> bool:
149-
...
141+
def round_trip(self) -> bool: ...
150142

151-
def mode_is_json(self) -> bool:
152-
...
143+
def mode_is_json(self) -> bool: ...
153144

154-
def __str__(self) -> str:
155-
...
145+
def __str__(self) -> str: ...
156146

157-
def __repr__(self) -> str:
158-
...
147+
def __repr__(self) -> str: ...
159148

160149

161150
class FieldSerializationInfo(SerializationInfo, Protocol):
162151
@property
163-
def field_name(self) -> str:
164-
...
152+
def field_name(self) -> str: ...
165153

166154

167155
class ValidationInfo(Protocol):
@@ -305,8 +293,7 @@ def plain_serializer_function_ser_schema(
305293

306294

307295
class SerializerFunctionWrapHandler(Protocol): # pragma: no cover
308-
def __call__(self, __input_value: Any, __index_key: int | str | None = None) -> Any:
309-
...
296+
def __call__(self, __input_value: Any, __index_key: int | str | None = None) -> Any: ...
310297

311298

312299
# (__input_value: Any, __serializer: SerializerFunctionWrapHandler) -> Any

tests/benchmarks/test_complete_benchmark.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
General benchmarks that attempt to cover all field types, through by no means all uses of all field types.
33
"""
4+
45
import json
56
from datetime import date, datetime, time
67
from decimal import Decimal

tests/benchmarks/test_micro_benchmarks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Numerous benchmarks of specific functionality.
33
"""
4+
45
import decimal
56
import json
67
import platform

tests/requirements-linting.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
griffe==0.40.0
2-
pyright==1.1.349
3-
ruff==0.1.15
1+
griffe==0.41.0
2+
pyright==1.1.352
3+
ruff==0.3.0
44
mypy==1.8.0

tests/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
coverage==7.4.1
1+
coverage==7.4.3
22
dirty-equals==0.7.1.post0
3-
hypothesis==6.97.4
3+
hypothesis==6.98.15
44
# TODO: remove manual override for dateutil once a version newer than 2.8.2 is
55
# released which removes use of deprecated utcfromtimestamp
66
git+https://github.com/dateutil/dateutil.git@f2293200747fb03d56c6c5997bfebeabe703576f
77
# pandas doesn't offer prebuilt wheels for all versions and platforms we test in CI e.g. aarch64 musllinux
88
pandas==2.1.3; python_version >= "3.9" and python_version < "3.13" and implementation_name == "cpython" and platform_machine == 'x86_64'
9-
pytest==8.0.0
9+
pytest==8.0.2
1010
# we run codspeed benchmarks on x86_64 CPython (i.e. native github actions architecture)
1111
pytest-codspeed~=2.2.0; implementation_name == "cpython" and platform_machine == 'x86_64'
1212
# pytest-examples currently depends on aiohttp via black; we don't want to build
@@ -16,7 +16,7 @@ pytest-speed==0.3.5
1616
pytest-mock==3.11.1
1717
pytest-pretty==1.2.0
1818
pytest-timeout==2.2.0
19-
pytz==2023.4
19+
pytz==2024.1
2020
# numpy doesn't offer prebuilt wheels for all versions and platforms we test in CI e.g. aarch64 musllinux
2121
numpy==1.26.2; python_version >= "3.9" and python_version < "3.13" and implementation_name == "cpython" and platform_machine == 'x86_64'
2222
exceptiongroup==1.1; python_version < "3.11"

tests/test_typing.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,16 @@ class Foo:
1919
bar: str
2020

2121

22-
def foo(bar: str) -> None:
23-
...
22+
def foo(bar: str) -> None: ...
2423

2524

26-
def validator_deprecated(value: Any, info: core_schema.FieldValidationInfo) -> None:
27-
...
25+
def validator_deprecated(value: Any, info: core_schema.FieldValidationInfo) -> None: ...
2826

2927

30-
def validator(value: Any, info: core_schema.ValidationInfo) -> None:
31-
...
28+
def validator(value: Any, info: core_schema.ValidationInfo) -> None: ...
3229

3330

34-
def wrap_validator(value: Any, call_next: Callable[[Any], Any], info: core_schema.ValidationInfo) -> None:
35-
...
31+
def wrap_validator(value: Any, call_next: Callable[[Any], Any], info: core_schema.ValidationInfo) -> None: ...
3632

3733

3834
def test_schema_typing() -> None:

0 commit comments

Comments
 (0)