1
0
forked from VimPlug/jedi

Remove django from the project API

This commit is contained in:
Dave Halter
2020-01-31 01:50:52 +01:00
parent e5ec2a3adf
commit d09882f970

View File

@@ -70,7 +70,7 @@ class Project(object):
being properly configured on the ``sys.path``. being properly configured on the ``sys.path``.
""" """
def py2_comp(path, python_path=None, python_version=None, sys_path=None, def py2_comp(path, python_path=None, python_version=None, sys_path=None,
added_sys_path=True, smart_sys_path=True, _django=False): added_sys_path=True, smart_sys_path=True):
if python_version is not None and python_path is not None: if python_version is not None and python_path is not None:
raise ValueError('You cannot use both python_version and python_path') raise ValueError('You cannot use both python_version and python_path')
self._path = os.path.abspath(path) self._path = os.path.abspath(path)
@@ -79,7 +79,7 @@ class Project(object):
self._python_version = python_version self._python_version = python_version
self._sys_path = sys_path self._sys_path = sys_path
self._smart_sys_path = smart_sys_path self._smart_sys_path = smart_sys_path
self._django = _django self._django = False
self.added_sys_path = [] self.added_sys_path = []
"""The sys path that is going to be added at the end of the """ """The sys path that is going to be added at the end of the """
@@ -204,7 +204,9 @@ def get_default_project(path=None):
first_no_init_file = dir first_no_init_file = dir
if _is_django_path(dir): if _is_django_path(dir):
return Project(dir, _django=True) project = Project(dir)
project._django = True
return project
if probable_path is None and _is_potential_project(dir): if probable_path is None and _is_potential_project(dir):
probable_path = dir probable_path = dir