latch-data-validation 0.1.2__tar.gz → 0.1.4__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.1
2
2
  Name: latch-data-validation
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Data validation for latch python backend services
5
5
  License: CC0 1.0
6
6
  Author: Max Smolin
@@ -79,7 +79,7 @@ class DataValidationError(RuntimeError):
79
79
 
80
80
  pretty_msg = prettify(
81
81
  self.msg,
82
- add_colon=True
82
+ add_colon=True,
83
83
  # add_colon=len(self.children) > 0 or len(self.details) > 0
84
84
  )
85
85
  res = f"{indent}{pretty_msg}\n"
@@ -405,6 +405,7 @@ def validate(x: JsonValue, cls: type[T]) -> T:
405
405
  "code.namespace": validate.__module__,
406
406
  },
407
407
  ) as s:
408
- s.set_attribute("validation.target", cls.__qualname__)
408
+ # ayush: union types dont have a `__qualname__` attr
409
+ s.set_attribute("validation.target", getattr(cls, "__qualname__", repr(cls)))
409
410
 
410
411
  return untraced_validate(x, cls)
@@ -1,11 +1,11 @@
1
1
  [tool.poetry]
2
2
  name = "latch-data-validation"
3
- version = "0.1.2"
3
+ version = "0.1.4"
4
4
  description = "Data validation for latch python backend services"
5
5
  authors = ["Max Smolin <max@latch.bio>"]
6
6
  license = "CC0 1.0"
7
7
  readme = "README.md"
8
- packages = [{include = "latch_data_validation"}]
8
+ packages = [{ include = "latch_data_validation" }]
9
9
 
10
10
  [tool.poetry.dependencies]
11
11
  python = "^3.11"
@@ -1,30 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from setuptools import setup
3
-
4
- packages = \
5
- ['latch_data_validation']
6
-
7
- package_data = \
8
- {'': ['*']}
9
-
10
- install_requires = \
11
- ['opentelemetry-api>=1.15.0,<2.0.0']
12
-
13
- setup_kwargs = {
14
- 'name': 'latch-data-validation',
15
- 'version': '0.1.2',
16
- 'description': 'Data validation for latch python backend services',
17
- 'long_description': '# python-data-validation\n',
18
- 'author': 'Max Smolin',
19
- 'author_email': 'max@latch.bio',
20
- 'maintainer': 'None',
21
- 'maintainer_email': 'None',
22
- 'url': 'None',
23
- 'packages': packages,
24
- 'package_data': package_data,
25
- 'install_requires': install_requires,
26
- 'python_requires': '>=3.11,<4.0',
27
- }
28
-
29
-
30
- setup(**setup_kwargs)