-
Notifications
You must be signed in to change notification settings - Fork 18
feat: allow arbitrary command classes #81
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
base: master
Are you sure you want to change the base?
feat: allow arbitrary command classes #81
Conversation
Ah there is more too this because https://github.com/mkdocs/mkdocs-click/blob/master/mkdocs_click/_docs.py#L104 looks like a decent amount of those. Do we want to support a special option for each one of those checks? |
yeah would need to specify options for the following:
Seems feasible to just default to all the click ones as a default and use the same pattern that is added so far for |
After looking closer into https://github.com/python-trio/asyncclick, I'm hesitant to document the feature but I think it's okay if you add options for each of those as long as they are prefixed by something (and again, undocumented). I think that library is fundamentally wrong for literally forking the code rather than wrapping (in which case I would appreciate feedback from @oprypin as I really think that library got it wrong. |
Are you still interested in adding support for other custom classes like Context? I actually require this now as well! |
I am! Are you looking at just async-click? I was curious what it would take to add support for: async-click Others?? https://github.com/danimelchor/clypi ? It no longer remains mkdocs-click in that case but making it easy to support a wide variety of CLI's would be pretty cool |
I'm interested in using |
Okay, the PR is merged so you can go ahead and rebase! The main 3 classes should be supported now. |
Add a new option
:command_class
that allows a user to specify a custom type for a command class, which will then attempted to be imported. Defaults toclick.BaseCommand
.Closes #80