Skip to content

Commit 6d7b3d2

Browse files
committed
fix(langserver): unbound local variable in imports manager
1 parent 41f495b commit 6d7b3d2

File tree

1 file changed

+2
-2
lines changed
  • packages/language_server/src/robotcode/language_server/robotframework/diagnostics

1 file changed

+2
-2
lines changed

packages/language_server/src/robotcode/language_server/robotframework/diagnostics/imports_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,9 +1063,9 @@ async def _get_libdoc(name: str, args: Tuple[Any, ...], working_dir: str, base_d
10631063
meta_file = Path(self.lib_doc_cache_path, meta.filepath_base + ".meta.json")
10641064
if meta_file.exists():
10651065
try:
1066+
spec_path = None
10661067
try:
10671068
saved_meta = from_json(meta_file.read_text("utf-8"), LibraryMetaData)
1068-
spec_path = None
10691069
if saved_meta == meta:
10701070
spec_path = Path(self.lib_doc_cache_path, meta.filepath_base + ".spec.json")
10711071
return from_json(
@@ -1214,9 +1214,9 @@ async def _get_libdoc(name: str, args: Tuple[Any, ...], working_dir: str, base_d
12141214
meta_file = Path(self.variables_doc_cache_path, meta.filepath_base + ".meta.json")
12151215
if meta_file.exists():
12161216
try:
1217+
spec_path = None
12171218
try:
12181219
saved_meta = from_json(meta_file.read_text("utf-8"), LibraryMetaData)
1219-
spec_path = None
12201220
if saved_meta == meta:
12211221
spec_path = Path(self.variables_doc_cache_path, meta.filepath_base + ".spec.json")
12221222
return from_json(

0 commit comments

Comments
 (0)