Skip to content

Commit

Permalink
downgrade validator to maintain behavior for correct draft for v1.0.0…
Browse files Browse the repository at this point in the history
… HiFa
  • Loading branch information
kratsg committed Dec 7, 2023
1 parent 3bb4d0e commit fcfab82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pyhf/schema/validator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import numbers
from pathlib import Path
import jsonschema
Expand Down Expand Up @@ -96,6 +98,10 @@ def validate(

Validator = jsonschema.Draft202012Validator

# downgrade Validator for v1.0.0
if version == '1.0.0':
Validator = jsonschema.Draft6Validator # type: ignore[assignment]

if allow_tensors:
type_checker = Validator.TYPE_CHECKER.redefine(
"array", _is_array_or_tensor
Expand Down

0 comments on commit fcfab82

Please sign in to comment.