Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions configshell/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,12 +1243,12 @@ def ui_command_bookmarks(self, action, bookmark=None):
if not self.shell.prefs['bookmarks']:
bookmarks += "No bookmarks yet.\n"
else:
for (bookmark, path) \
for (b, path) \
in self.shell.prefs['bookmarks'].items():
if len(bookmark) == 1:
if len(b) == 1:
bookmark += '\0'
underline = ''.ljust(len(bookmark), '-')
bookmarks += f"{bookmark}\n{underline}\n{path}\n\n"
underline = ''.ljust(len(b), '-')
bookmarks += f"{b}\n{underline}\n{path}\n\n"
self.shell.con.epy_write(bookmarks)
return None
else:
Expand Down
6 changes: 2 additions & 4 deletions configshell/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,7 @@ def _complete_token_pparam(self, text, path, command, pparams, kparams):
for index in range(len(pparams)):
if index < len(cmd_params):
current_parameters[cmd_params[index]] = pparams[index]
for key, value in kparams.items():
current_parameters[key] = value
current_parameters.update(kparams)
self._completion_help_topic = command
completion_method = target.get_completion_method(command)
self.log.debug(f"Command {command} accepts parameters {cmd_params}.")
Expand Down Expand Up @@ -547,8 +546,7 @@ def _complete_token_kparam(self, text, path, command, pparams, kparams):
current_parameters = {}
for index in range(len(pparams)):
current_parameters[cmd_params[index]] = pparams[index]
for key, value in kparams.items():
current_parameters[key] = value
current_parameters.update(kparams)
completion_method = target.get_completion_method(command)
if completion_method:
completions = completion_method(
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,5 @@ ignore = [
[tool.ruff.lint.per-file-ignores]
# Possible hardcoded password assigned to: "current_token"
"configshell/shell" = ["S105"]
# Required for pre-commit. Examples could be improved though.
"examples/*" = ["S"]