mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-27 14:02:17 +08:00
Some more sys path corrections.
The sys path should be defined more or less in the beginning and not be different for all modules
This commit is contained in:
@@ -64,9 +64,8 @@ class Project(object):
|
||||
want. By default the ``sys.path.`` is generated from the
|
||||
environment (virtualenvs, etc).
|
||||
:param smart_sys_path: If this is enabled (default), adds paths from
|
||||
Django, buildout and local directories. Otherwise you will have to
|
||||
rely on your packages being properly configured on the
|
||||
``sys.path``.
|
||||
local directories. Otherwise you will have to rely on your packages
|
||||
being properly configured on the ``sys.path``.
|
||||
"""
|
||||
def py2_comp(path, environment=None, sys_path=None,
|
||||
smart_sys_path=True, _django=False):
|
||||
|
||||
@@ -264,11 +264,6 @@ class Importer(object):
|
||||
def sys_path_with_modifications(self):
|
||||
sys_path_mod = self._evaluator.get_sys_path() \
|
||||
+ sys_path.check_sys_path_modifications(self.module_context)
|
||||
if self.file_path is not None:
|
||||
# Since we know nothing about the call location of the sys.path,
|
||||
# it's a possibility that the current directory is the origin of
|
||||
# the Python execution.
|
||||
sys_path_mod.append(force_unicode(os.path.dirname(self.file_path)))
|
||||
|
||||
return sys_path_mod
|
||||
|
||||
|
||||
Reference in New Issue
Block a user