@@ -157,7 +157,8 @@ def m_initialize(self, processId=None, rootUri=None, rootPath=None, initializati
157157 rootUri = uris .from_fs_path (rootPath ) if rootPath is not None else ''
158158
159159 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' , {}))
161162 self ._dispatchers = self ._hook ('pyls_dispatchers' )
162163 self ._hook ('pyls_initialize' )
163164
@@ -299,17 +300,17 @@ def m_workspace__did_change_configuration(self, settings=None):
299300 for doc_uri in self .workspace .documents :
300301 self .lint (doc_uri , is_saved = False )
301302
302- def m_workspace__did_change_watched_files (self , changes = [] , ** _kwargs ):
303+ def m_workspace__did_change_watched_files (self , changes = None , ** _kwargs ):
303304 changed_py_files = set ()
304305 config_changed = False
305- for d in changes :
306+ for d in ( changes or []) :
306307 if d ['uri' ].endswith (PYTHON_FILE_EXTENSIONS ):
307308 changed_py_files .add (d ['uri' ])
308309 elif d ['uri' ].endswith (CONFIG_FILEs ):
309310 config_changed = True
310311
311312 if config_changed :
312- self .settings .cache_clear ()
313+ self .config . settings .cache_clear ()
313314 elif not changed_py_files :
314315 # Only externally changed python files and lint configs may result in changed diagnostics.
315316 return
0 commit comments