statica 1.0.1__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statica
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A minimalistic data validation library
5
5
  Author-email: Marcel Kröker <kroeker.marcel@gmail.com>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "statica"
3
- version = "1.0.1"
3
+ version = "1.0.2"
4
4
  description = "A minimalistic data validation library"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Marcel Kröker", email = "kroeker.marcel@gmail.com" }]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statica
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A minimalistic data validation library
5
5
  Author-email: Marcel Kröker <kroeker.marcel@gmail.com>
6
6
  License: MIT License
File without changes
File without changes
File without changes
File without changes
@@ -239,6 +239,9 @@ def Field( # noqa: N802
239
239
 
240
240
  @dataclass_transform(kw_only_default=True)
241
241
  class StaticaMeta(type):
242
+ type_error_class: type[Exception] = TypeValidationError
243
+ constraint_error_class: type[Exception] = ConstraintValidationError
244
+
242
245
  def __new__(cls, name: str, bases: tuple, namespace: dict[str, Any]) -> type:
243
246
  """
244
247
  Set up Field descriptors for each type-hinted attribute which does not have one
@@ -291,9 +294,6 @@ class StaticaMeta(type):
291
294
 
292
295
 
293
296
  class Statica(metaclass=StaticaMeta):
294
- type_error_class: type[Exception] = TypeValidationError
295
- constraint_error_class: type[Exception] = ConstraintValidationError
296
-
297
297
  @classmethod
298
298
  def from_map(cls, mapping: Mapping[str, Any]) -> Self:
299
299
  instance = cls(**mapping)
File without changes
File without changes