@@ -21,8 +21,7 @@ class Workspace(object):
21
21
M_APPLY_EDIT = 'workspace/applyEdit'
22
22
M_SHOW_MESSAGE = 'window/showMessage'
23
23
24
- def __init__ (self , root_uri , endpoint , config = None ):
25
- self ._config = config
24
+ def __init__ (self , root_uri , endpoint ):
26
25
self ._root_uri = root_uri
27
26
self ._endpoint = endpoint
28
27
self ._root_uri_scheme = uris .urlparse (self ._root_uri )[0 ]
@@ -98,14 +97,12 @@ def _create_document(self, doc_uri, source=None, version=None):
98
97
doc_uri , source = source , version = version ,
99
98
extra_sys_path = self .source_roots (path ),
100
99
rope_project_builder = self ._rope_project_builder ,
101
- config = self ._config ,
102
100
)
103
101
104
102
105
103
class Document (object ):
106
104
107
- def __init__ (self , uri , source = None , version = None , local = True , extra_sys_path = None , rope_project_builder = None ,
108
- config = None ):
105
+ def __init__ (self , uri , source = None , version = None , local = True , extra_sys_path = None , rope_project_builder = None ):
109
106
self .uri = uri
110
107
self .version = version
111
108
self .path = uris .to_fs_path (uri )
@@ -115,7 +112,6 @@ def __init__(self, uri, source=None, version=None, local=True, extra_sys_path=No
115
112
self ._source = source
116
113
self ._extra_sys_path = extra_sys_path or []
117
114
self ._rope_project_builder = rope_project_builder
118
- self ._config = config
119
115
120
116
def __str__ (self ):
121
117
return str (self .uri )
@@ -220,14 +216,9 @@ def jedi_script(self, position=None):
220
216
def sys_path (self ):
221
217
# Copy our extra sys path
222
218
path = list (self ._extra_sys_path )
223
- settings = self ._config .settings () if self ._config else {}
224
-
225
- python_virtualenv = settings .get ('python_virtualenv' )
226
- log .debug ('Jedi Environment: %s' , python_virtualenv )
227
- if python_virtualenv :
228
- environment = jedi .api .environment .create_environment (python_virtualenv , safe = False )
229
- else :
230
- environment = jedi .api .environment .get_cached_default_environment ()
219
+
220
+ # TODO(gatesn): #339 - make better use of jedi environments, they seem pretty powerful
221
+ environment = jedi .api .environment .get_cached_default_environment ()
231
222
path .extend (environment .get_sys_path ())
232
223
233
224
return path
0 commit comments