Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Nov 4, 2024
1 parent 108e67e commit 8617b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cobaya/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
ParamValuesDict = Dict[str, float]
# Do not yet explicitly support passing instances here
TheoriesDict = Dict[str, Union[None, TheoryDict, Type]]
LikesDict = Dict[str, Union[None, LikeDict, Type, Callable]]
LikesDict = Dict[str, Union[None, str, LikeDict, Type, Callable]]
SamplersDict = Dict[str, Optional[SamplerDict]]
PriorsDict = Dict[str, Union[str, Callable]]

Expand Down Expand Up @@ -213,7 +213,7 @@ def validate_type(expected_type: type, value: Any, path: str = ''):

if isinstance(value, Mapping) != issubclass(origin, Mapping):
raise TypeError(
f"{curr_path} must be {args[0]}, got {type(value).__name__}"
f"{curr_path} must be {origin.__name__}, got {type(value).__name__}"
)

if issubclass(origin, Mapping):
Expand Down

0 comments on commit 8617b37

Please sign in to comment.