json-structure 0.6.0__tar.gz → 0.6.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.
- {json_structure-0.6.0 → json_structure-0.6.2}/PKG-INFO +1 -1
- json_structure-0.6.2/src/json_structure/_version.py +24 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/src/json_structure/instance_validator.py +4 -3
- json_structure-0.6.0/src/json_structure/_version.py +0 -34
- {json_structure-0.6.0 → json_structure-0.6.2}/.gitignore +0 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/README.md +0 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/pyproject.toml +0 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/src/json_structure/__init__.py +0 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/src/json_structure/error_codes.py +0 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/src/json_structure/json_source_locator.py +0 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/src/json_structure/schema_exporter.py +0 -0
- {json_structure-0.6.0 → json_structure-0.6.2}/src/json_structure/schema_validator.py +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.6.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 6, 2)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = None
|
|
@@ -247,12 +247,13 @@ class JSONStructureInstanceValidator:
|
|
|
247
247
|
backup = list(self.errors)
|
|
248
248
|
self.errors = []
|
|
249
249
|
self.validate_instance(instance, {"type": t}, path)
|
|
250
|
-
|
|
250
|
+
branch_errors = self.errors
|
|
251
|
+
self.errors = backup
|
|
252
|
+
if not branch_errors:
|
|
251
253
|
union_valid = True
|
|
252
254
|
break
|
|
253
255
|
else:
|
|
254
|
-
union_errors.extend(
|
|
255
|
-
self.errors = backup
|
|
256
|
+
union_errors.extend(branch_errors)
|
|
256
257
|
if not union_valid:
|
|
257
258
|
self.errors.append(f"Instance at {path} does not match any type in union: {union_errors}")
|
|
258
259
|
return self.errors
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# file generated by setuptools-scm
|
|
2
|
-
# don't change, don't track in version control
|
|
3
|
-
|
|
4
|
-
__all__ = [
|
|
5
|
-
"__version__",
|
|
6
|
-
"__version_tuple__",
|
|
7
|
-
"version",
|
|
8
|
-
"version_tuple",
|
|
9
|
-
"__commit_id__",
|
|
10
|
-
"commit_id",
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
TYPE_CHECKING = False
|
|
14
|
-
if TYPE_CHECKING:
|
|
15
|
-
from typing import Tuple
|
|
16
|
-
from typing import Union
|
|
17
|
-
|
|
18
|
-
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
-
COMMIT_ID = Union[str, None]
|
|
20
|
-
else:
|
|
21
|
-
VERSION_TUPLE = object
|
|
22
|
-
COMMIT_ID = object
|
|
23
|
-
|
|
24
|
-
version: str
|
|
25
|
-
__version__: str
|
|
26
|
-
__version_tuple__: VERSION_TUPLE
|
|
27
|
-
version_tuple: VERSION_TUPLE
|
|
28
|
-
commit_id: COMMIT_ID
|
|
29
|
-
__commit_id__: COMMIT_ID
|
|
30
|
-
|
|
31
|
-
__version__ = version = '0.6.0'
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 6, 0)
|
|
33
|
-
|
|
34
|
-
__commit_id__ = commit_id = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|