@@ -157,7 +157,8 @@ def m_initialize(self, processId=None, rootUri=None, rootPath=None, initializati
157
157
rootUri = uris .from_fs_path (rootPath ) if rootPath is not None else ''
158
158
159
159
self .workspace = Workspace (rootUri , self ._endpoint )
160
- self .config = config .Config (rootUri , initializationOptions or {}, processId )
160
+ self .config = config .Config (rootUri , initializationOptions or {},
161
+ processId , _kwargs .get ('capabilities' , {}))
161
162
self ._dispatchers = self ._hook ('pyls_dispatchers' )
162
163
self ._hook ('pyls_initialize' )
163
164
@@ -299,17 +300,17 @@ def m_workspace__did_change_configuration(self, settings=None):
299
300
for doc_uri in self .workspace .documents :
300
301
self .lint (doc_uri , is_saved = False )
301
302
302
- def m_workspace__did_change_watched_files (self , changes = [] , ** _kwargs ):
303
+ def m_workspace__did_change_watched_files (self , changes = None , ** _kwargs ):
303
304
changed_py_files = set ()
304
305
config_changed = False
305
- for d in changes :
306
+ for d in ( changes or []) :
306
307
if d ['uri' ].endswith (PYTHON_FILE_EXTENSIONS ):
307
308
changed_py_files .add (d ['uri' ])
308
309
elif d ['uri' ].endswith (CONFIG_FILEs ):
309
310
config_changed = True
310
311
311
312
if config_changed :
312
- self .settings .cache_clear ()
313
+ self .config . settings .cache_clear ()
313
314
elif not changed_py_files :
314
315
# Only externally changed python files and lint configs may result in changed diagnostics.
315
316
return
0 commit comments