fix(api): correct path retrieval in scan_extensions method

The previous does not work when `cwd` is not `api`, switching to
`__file__` fixes this.
pull/20699/head
QuantumGhost 12 months ago
parent 03f91daa27
commit a3202356e6

@ -42,7 +42,7 @@ class Extensible:
position_map: dict[str, int] = {}
# get the path of the current class
current_path = os.path.abspath(cls.__module__.replace(".", os.path.sep) + ".py")
current_path = os.path.abspath(__file__)
current_dir_path = os.path.dirname(current_path)
# traverse subdirectories

Loading…
Cancel
Save