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

cli: simplify --exclude-components business logic #445

Open
tiborsimko opened this issue Nov 10, 2020 · 0 comments
Open

cli: simplify --exclude-components business logic #445

tiborsimko opened this issue Nov 10, 2020 · 0 comments

Comments

@tiborsimko
Copy link
Member

Minor: What do you think about adding a common decorator like, @click_add_exclude_components_option, with a callback that performs this logic, like we do for tokens in R-Client?

We could even have a single option decorator for components @click_add_components_option with the possibility of taking a parameter allow_exclude_components=True so components will always be the result of select components with or without exclude components filter.

@git_commands.command(name="git-fork")
@click_add_components_option
def git_fork(components, ...):
    ...
@git_commands.command(name="git-status")
@click_add_components_option(allow_exclude_components=True)
def git_status(components, ...): 
    ...

Edited: We could create a ticket for it.

Originally posted by @diegodelemos in #443 (comment)

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

No branches or pull requests

1 participant