Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pydantic2ts/cli/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _import_module(path: str) -> ModuleType:
definition exist in sys.modules under that name.
"""
try:
if os.path.exists(path):
if os.path.exists(path) and os.path.isfile(path):
name = uuid4().hex
spec = spec_from_file_location(name, path, submodule_search_locations=[])
assert spec is not None, f"spec_from_file_location failed for {path}"
Expand Down