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

enhancement: add shell completions for molecule #509

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

syaghoubi00
Copy link

@syaghoubi00 syaghoubi00 commented Dec 30, 2024

Add shell completion for molecule, as it does not use flags that are picked up by argcomplete. Includes tests for added completions and the ability to test future completion additions.

@syaghoubi00 syaghoubi00 requested a review from a team as a code owner December 30, 2024 01:39
@syaghoubi00 syaghoubi00 changed the title feat: add shell completions for molecule enhancement: add shell completions for molecule Dec 30, 2024
@abhikdps abhikdps added enhancement New feature or request and removed feature labels Dec 30, 2024
@syaghoubi00 syaghoubi00 force-pushed the feat-molecule-completions branch from e9c15f1 to 1ab069c Compare December 30, 2024 19:15
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

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

Can you also add a test (pytest) that checks that auto completion works?

@syaghoubi00
Copy link
Author

I went ahead and added a test for the completions as requested. It was my first foray into writing a pytest, so there is likely room for improvement.

I wasn't sure on the best approach for testing the completions, since I was thinking there might have to be some user input simulation to try to recreate tab completion. I ended up just checking if the completion function was available, however, this is an indirect test.

It should be easy to include more completions to test for, in the event more are added in the future. But they would need to be in the form that is read by the type command.

- pydoclint-DOC502: Remove the Raise section in the docstring since
it wasn't an explicit raise condition
-pylint-W0621: Don't rename scopes

Signed-off-by: Sebastian Yaghoubi <[email protected]>
@syaghoubi00 syaghoubi00 requested a review from ssbarnea January 9, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants