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

bug: fixing version flag handling in CLI #169

Merged
merged 3 commits into from
Mar 12, 2025
Merged

Conversation

frhanjav
Copy link
Contributor

What this PR does?

Solve #168

This PR refactors the handling of the --version flag in the CLI by updating the version_callback function and modifying the Option configuration.

Changes Introduced

  • Updated version_callback to accept a boolean flag (value: bool) instead of being parameterless.
  • Ensured that version_callback raises typer.Exit() to exit the CLI properly after displaying the version.
  • Changed the default value of version in Option from None to False for better consistency.
  • Linked the version_callback to the version option to trigger version printing correctly.

Pull Request checklists

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • the tests generate log file(s) (path).
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

  • I have reviewed the changes and it contains no misspelling.
  • The code is well commented, especially in the parts that contain more
    complexity.
  • New and old tests passed locally.

Before:
Screenshot 2025-03-11 at 4 26 34 PM

After:
Screenshot 2025-03-11 at 4 26 44 PM

@sanjay7178
Copy link
Contributor

@frhanjav That looks awesome

Copy link
Member

@xmnlab xmnlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this issue @frhanjav !

I will remove the unnecessary comments and it is ready to go.
thanks!

@xmnlab xmnlab merged commit af298c3 into osl-incubator:main Mar 12, 2025
9 checks passed
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