8000 Typos · pydantic/pydantic@4cf3a25 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4cf3a25

Browse files
committed
Typos
1 parent d174f8b commit 4cf3a25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pydantic/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def validated_setattr(instance: Any, field: str, value: str, /) -> None:
277277
# If slots is set, `pickle` (relied on by `copy.copy()`) will use
278278
# `__setattr__()` to reconstruct the dataclass. However, the custom
279279
# `__setattr__()` set above relies on `validate_assignment()`, which
280-
# in turn excepts all the field values to be already present on the
280+
# in turn expects all the field values to be already present on the
281281
# instance, resulting in attribute errors.
282282
# As such, we make use of `object.__setattr__()` instead.
283283
# Note that we do so only if `__setstate__()` isn't already set (this is the

tests/test_dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ class Model:
24302430
assert dc.b == 'bar'
24312431

24322432

2433-
# Must be defined at the module level to be pickable:
2433+
# Must be defined at the module level to be picklable:
24342434
@pydantic.dataclasses.dataclass(slots=True, config={'validate_assignment': True})
24352435
class DataclassSlotsValidateAssignment:
24362436
a: int

0 commit comments

Comments
 (0)
0