@@ -400,12 +400,16 @@ def __init__(
400
400
self ,
401
401
name : str ,
402
402
args : Tuple [Any , ...],
403
+ working_dir : str ,
404
+ base_dir : str ,
403
405
parent : ImportsManager ,
404
- get_variables_doc_coroutine : Callable [[], Coroutine [Any , Any , VariablesDoc ]],
406
+ get_variables_doc_coroutine : Callable [[str , Tuple [ Any , ...], str , str ], Coroutine [Any , Any , VariablesDoc ]],
405
407
) -> None :
406
408
super ().__init__ (parent )
407
409
self .name = name
408
410
self .args = args
411
+ self .working_dir = working_dir
412
+ self .base_dir = base_dir
409
413
self ._get_variables_doc_coroutine = get_variables_doc_coroutine
410
414
self ._lib_doc : Optional [VariablesDoc ] = None
411
415
@@ -438,7 +442,7 @@ async def check_file_changed(self, changes: List[FileEvent]) -> Optional[FileCha
438
442
return None
439
443
440
444
async def _update (self ) -> None :
441
- self ._lib_doc = await self ._get_variables_doc_coroutine ()
445
+ self ._lib_doc = await self ._get_variables_doc_coroutine (self . name , self . args , self . working_dir , self . base_dir )
442
446
443
447
if self ._lib_doc is not None :
444
448
self .file_watchers .append (
@@ -1225,7 +1229,7 @@ async def get_libdoc_for_variables_import(
1225
1229
variables ,
1226
1230
)
1227
1231
1228
- async def _get_libdoc () -> VariablesDoc :
1232
+ async def _get_libdoc (name : str , args : Tuple [ Any , ...], working_dir : str , base_dir : str ) -> VariablesDoc :
1229
1233
meta , source = await self .get_variables_meta (
1230
1234
name ,
1231
1235
base_dir ,
@@ -1311,7 +1315,9 @@ async def _get_libdoc() -> VariablesDoc:
1311
1315
1312
1316
async with self ._variables_lock :
1313
1317
if entry_key not in self ._variables :
1314
- self ._variables [entry_key ] = _VariablesEntry (name , args , self , _get_libdoc )
1318
+ self ._variables [entry_key ] = _VariablesEntry (
1319
+ name , resolved_args , str (self .folder .to_path ()), base_dir , self , _get_libdoc
1320
+ )
1315
1321
1316
1322
entry = self ._variables [entry_key ]
1317
1323
0 commit comments