Skip to content

Fix #99: Rename ctx variables to avoid shadowing CLIContext and click.Context#153

Merged
himanshu231204 merged 2 commits into
OpenAgentHQ:mainfrom
fazalpsinfo-cmyk:fix-99-ctx-shadowing
Jul 15, 2026
Merged

Fix #99: Rename ctx variables to avoid shadowing CLIContext and click.Context#153
himanshu231204 merged 2 commits into
OpenAgentHQ:mainfrom
fazalpsinfo-cmyk:fix-99-ctx-shadowing

Conversation

@fazalpsinfo-cmyk

Copy link
Copy Markdown

Description

Fixes #99 - In cli/main.py, the variable name ctx is used for two different types: first as a CLIContext object (line 80) and then reassigned to a click.Context object (line 92). This creates confusion and potential bugs if someone tries to access the original CLI context after reassignment.

Changes

  • Renamed ctxcli_ctx for the CLIContext instance
  • Renamed ctxclick_ctx for the click.Context instance
  • Updated set_context() call to use the renamed variable

Related

Fixes #99


Support open-source contributions: https://buymeacoffee.com/muhamedfazalps

@himanshu231204 himanshu231204 merged commit c9e0a07 into OpenAgentHQ:main Jul 15, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @fazalpsinfo-cmyk!

Your pull request has been successfully merged into main. 🚀

Thank you for contributing to OpenAgentHQ and helping improve the project.

We truly appreciate your contribution and hope to see you back with more amazing PRs!

Happy Open Sourcing! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: ctx variable shadowed from CLIContext to click.Context in main.py

2 participants