Skip to content

Commit a99ac98

Browse files
committed
fix: avoid trouble on Windows with Python 3.9
1 parent 2694629 commit a99ac98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

version_query/query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def _caller_folder(stack_level: int = 1) -> pathlib.Path:
1818
frame_info = inspect.getouterframes(inspect.currentframe())[stack_level]
1919
caller_path = frame_info[1] # frame_info.filename
2020

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

0 commit comments

Comments
 (0)