Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CommandSet._cmd to a read-only property which never returns None. #1371

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

kmvanbrunt
Copy link
Member

This addresses issue where CommandSet methods which only run after it is registered have to either check if self._cmd is None or cast it to the CLI class to avoid type checker errors.

cmd2/command_definition.py Outdated Show resolved Hide resolved
This addresses issue where CommandSet methods which only run after it is
registered have to either check if self._cmd is None or cast it to the CLI
class to avoid type checker errors.
tleonhardt
tleonhardt previously approved these changes Nov 5, 2024
@kmvanbrunt kmvanbrunt merged commit e281a40 into master Nov 5, 2024
46 checks passed
@kmvanbrunt kmvanbrunt deleted the _cmd_property branch November 5, 2024 13:44
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.

3 participants