Skip to content

Commit

Permalink
Dump only state related doc
Browse files Browse the repository at this point in the history
Instead of dumping all the doc for each state, associate only the doc
related to this kind of state (ie. at, and at.absent for state "at")

Signed-off-by: Matthieu Patou <mat@matws.net>
  • Loading branch information
ekacnet committed Jan 14, 2024
1 parent 07f1fe6 commit b92f524
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions salt_lsp/cmds.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import subprocess
import shlex
import json
import pathlib
import pickle
import shlex
import subprocess
import tempfile
from os.path import abspath, dirname
from typing import Dict
Expand Down Expand Up @@ -39,7 +39,13 @@ def dump_state_name_completions() -> None:

for module in mod_list["local"]:
state_completions[module] = StateNameCompletion(
module, mod_list["local"][module], docs["local"]
module,
mod_list["local"][module],
{
k: v
for k, v in docs["local"].items()
if k.startswith(module)
},
)

dest_dir = pathlib.Path(dirname(abspath(__file__))) / "data"
Expand Down

0 comments on commit b92f524

Please sign in to comment.