From 1c87ae378de871b6b0e7d2f904806cf36adf7705 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Fri, 24 Jul 2020 15:45:44 +0100 Subject: [PATCH] This is a Path now --- jedi/api/classes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jedi/api/classes.py b/jedi/api/classes.py index a770ee52..774a9f98 100644 --- a/jedi/api/classes.py +++ b/jedi/api/classes.py @@ -15,6 +15,7 @@ the interesting information about all operations. """ import re import warnings +from pathlib import Path from typing import Optional from parso.tree import search_ancestor @@ -92,11 +93,11 @@ class BaseName(object): return self._name.get_root_context() @property - def module_path(self) -> Optional[str]: + def module_path(self) -> Optional[Path]: """ Shows the file path of a module. e.g. ``/usr/lib/python3.9/os.py`` - :rtype: str or None + :rtype: Path or None """ module = self._get_module_context() if module.is_stub() or not module.is_compiled():