Skip to content

Commit

Permalink
fix: corrected click context management in TutorCli, resolves #14
Browse files Browse the repository at this point in the history
* Corrected Click context management in TutorCli

* Code reformatted

* added changelog entry
  • Loading branch information
Abdul-Muqadim-Arbisoft authored Mar 26, 2024
1 parent 734289b commit 0fd491d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Improvement] This is a non-breaking change. Removed unnecessary command clearing in context parent, simplifying the context handling. (by @Abdul-Muqadim-Arbisoft)
2 changes: 0 additions & 2 deletions tutorwebui/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ def shell() -> None:
# Retrieve the current Click context. The context is used to manage the state
# and pass around internal objects within the Click framework.
ctx = click.get_current_context()
if ctx.parent and ctx.parent.command:
ctx.parent.command.commands = {} # type: ignore

while True:
try:
Expand Down

0 comments on commit 0fd491d

Please sign in to comment.