Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
binste committed Dec 25, 2022
1 parent 44d8476 commit d8b1a2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion altair/utils/schemapi.py
Expand Up @@ -59,12 +59,14 @@ def validate_jsonschema(*args, **kwargs):
# e.g. '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,
# (Gradient|string|null)>' would be a valid $ref in a Vega-Lite schema but
# it is not a valid URI reference due to the characters such as '<'.
# This is fine and we can disable this format check below-
# This is fine and we can disable this format check below.
for format_name in ["uri-reference"]:
try:
checker = validator_cls.FORMAT_CHECKER.checkers.pop(format_name)
removed_format_checkers.append((format_name, checker))
except KeyError:
# Format checks are only set by jsonschema if it can import
# the relevant dependencies
continue
output = jsonschema.validate(*args, **kwargs)
finally:
Expand Down
4 changes: 3 additions & 1 deletion tools/schemapi/schemapi.py
Expand Up @@ -57,12 +57,14 @@ def validate_jsonschema(*args, **kwargs):
# e.g. '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,
# (Gradient|string|null)>' would be a valid $ref in a Vega-Lite schema but
# it is not a valid URI reference due to the characters such as '<'.
# This is fine and we can disable this format check below-
# This is fine and we can disable this format check below.
for format_name in ["uri-reference"]:
try:
checker = validator_cls.FORMAT_CHECKER.checkers.pop(format_name)
removed_format_checkers.append((format_name, checker))
except KeyError:
# Format checks are only set by jsonschema if it can import
# the relevant dependencies
continue
output = jsonschema.validate(*args, **kwargs)
finally:
Expand Down

0 comments on commit d8b1a2a

Please sign in to comment.