diff --git a/changelog.d/20240326_115811_abdul.muqadim_fix_click_context_management.md b/changelog.d/20240326_115811_abdul.muqadim_fix_click_context_management.md new file mode 100644 index 0000000..3e18756 --- /dev/null +++ b/changelog.d/20240326_115811_abdul.muqadim_fix_click_context_management.md @@ -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) diff --git a/tutorwebui/cli.py b/tutorwebui/cli.py index cb3e26f..ef4209a 100644 --- a/tutorwebui/cli.py +++ b/tutorwebui/cli.py @@ -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: