Skip to content

Commit

Permalink
fixes #211
Browse files Browse the repository at this point in the history
  • Loading branch information
o-smirnov committed Feb 4, 2024
1 parent 7ae9464 commit 4a7a636
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scabha/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def validate_parameters(params: Dict[str, Any], schemas: Dict[str, Any],
# convert this to a pydantic dataclass which does validation
pcls = pydantic.dataclasses.dataclass(dcls)

# check Files etc. and expand globs
# check Files etc.
for name, value in list(inputs.items()):
# get schema from those that need validation, skip if not in schemas
schema = schemas.get(name)
Expand Down Expand Up @@ -227,6 +227,8 @@ def validate_parameters(params: Dict[str, Any], schemas: Dict[str, Any],
files = value
else:
raise ParameterValidationError(f"'{mkname(name)}={value}': invalid type '{type(value)}'")
# expand ~
files = [os.path.expanduser(f) for f in files]

# check for existence of all files in list, if needed
if must_exist:
Expand Down

0 comments on commit 4a7a636

Please sign in to comment.