summaryrefslogtreecommitdiff
path: root/astroid/modutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/modutils.py')
-rw-r--r--astroid/modutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py
index b890915d..24c72e6a 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -297,8 +297,9 @@ def check_modpath_has_init(path, mod_path):
def modpath_from_file_with_callback(filename, extrapath=None, is_package_cb=None):
filename = _path_from_filename(filename)
- filename = os.path.abspath(filename)
+ filename = os.path.realpath(os.path.expanduser(filename))
base = os.path.splitext(filename)[0]
+
if extrapath is not None:
for path_ in extrapath:
path = os.path.abspath(path_)