We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 793adf1 commit ce89dbbCopy full SHA for ce89dbb
src/py/kaleido/_mocker.py
@@ -27,9 +27,13 @@ def _get_jsons_in_paths(path: str | Path) -> list[Path]:
27
path = Path(path) if isinstance(path, str) else path
28
29
if path.is_dir():
30
- return [path / a for a in path.glob("*.json")]
31
- else:
+ _logger.info(f"Input is path {path}")
+ return path.glob("*.json")
32
+ elif path.is_file():
33
+ _logger.info(f"Input is file {path}")
34
return [path]
35
+ else:
36
+ raise TypeError("--input must be file or directory")
37
38
39
def _load_figures_from_paths(paths: list[Path]):
0 commit comments