Skip to content

Commit

Permalink
os -> pathlib (relative path)
Browse files Browse the repository at this point in the history
Signed-off-by: ejegrova <[email protected]>
  • Loading branch information
ejegrova committed Mar 11, 2024
1 parent 5af34e3 commit 822098e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cachi2/core/package_managers/gomod.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from datetime import datetime
from functools import cached_property
from itertools import chain
from pathlib import Path
from pathlib import Path, PurePath

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'PurePath' is not used.
from types import TracebackType
from typing import (
TYPE_CHECKING,
Expand Down Expand Up @@ -824,6 +824,10 @@ def get_relative_path_workspace_to_main_module(path1: Path, path2: Path) -> str:
f"Workspace module path {path2} is not relative to root path {app_dir.root}."
)
relative_path = os.path.relpath(path2, path1)
# Path(package.import_path).relative_to(module.original_name)
# breakpoint()
# rel_path = PurePath(path2).relative_to(path1, walk_up=True)

return relative_path

workspace_modules = []
Expand Down

0 comments on commit 822098e

Please sign in to comment.