Skip to content

Commit 617dc54

Browse files
committed
fix: handle case when calling code is determined to be a "<string>" instead of a file
1 parent 554fb3d commit 617dc54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

version_query/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _caller_folder(stack_level: int = 1) -> pathlib.Path:
1919
caller_path = frame_info[1] # frame_info.filename
2020

2121
here = pathlib.Path(caller_path).absolute().resolve()
22-
assert here.is_file(), here
22+
assert here.is_file() or here.name == '<string>', here
2323
here = here.parent
2424
assert here.is_dir(), here
2525
_LOG.debug('found directory "%s"', here)

0 commit comments

Comments
 (0)