Skip to content

Commit 62eca37

Browse files
committed
Fixed missed exception names
1 parent b4614b0 commit 62eca37

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

jsonsubschema/_canonicalization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
JSONtop,
1818
JSONbot
1919
)
20-
from jsonsubschema.exceptions import UnexpectedCanonicalization
20+
from jsonsubschema.exceptions import UnsupportedEnumCanonicalization
2121

2222
TOP = {}
2323
BOT = {"not": {}}

jsonsubschema/_checkers.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
import jsonsubschema._constants as definitions
1717
import jsonsubschema._utils as utils
1818
from jsonsubschema._utils import print_db
19+
from jsonsubschema.exceptions import (
20+
UnsupportedNegatedArray,
21+
UnsupportedNegatedObject
22+
)
1923

2024

2125
class UninhabitedMeta(type):
@@ -1121,7 +1125,11 @@ def neg(s):
11211125
# if s.__getattr__(k) != default:
11221126
# break
11231127
# else:
1124-
return None
1128+
if s.keys() & definitions.JtypesToKeywords['array']:
1129+
raise UnsupportedNegatedArray(schema=s)
1130+
else:
1131+
return boolToConstructor.get("anyOf")(
1132+
{"anyOf": get_default_types_except("array")})
11251133

11261134

11271135
class JSONTypeObject(JSONschema):

0 commit comments

Comments
 (0)