Skip to content

Commit

Permalink
Don't resolve symlinks.
Browse files Browse the repository at this point in the history
Closes: #2127.
  • Loading branch information
smurfix committed Apr 19, 2023
1 parent ae9ce82 commit deb9b10
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions astroid/modutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,6 @@ def _get_relative_base_path(filename: str, path_to_check: str) -> list[str] | No
if os.path.normcase(abs_filename).startswith(path_to_check):
importable_path = abs_filename

real_filename = os.path.realpath(filename)
if os.path.normcase(real_filename).startswith(path_to_check):
importable_path = real_filename

# if "var" in path_to_check:
# breakpoint()

if importable_path:
base_path = os.path.splitext(importable_path)[0]
relative_base_path = base_path[len(path_to_check) :]
Expand Down

0 comments on commit deb9b10

Please sign in to comment.