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

Allow with_plugins() to accept a string #33

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

Conversation

jvprat
Copy link

@jvprat jvprat commented Aug 14, 2021

This adds support for passing an endpoint name to with_plugins(), as proposed in #13:

  • If the plugins parameter is a string, it's interpreted as an endpoint name and pkg_resources.iter_entry_points() is called automatically. This should be backwards compatible.
  • The test_register_and_run is run for both the original good_cli and the new good_cli_by_name.
  • Most uses of with_plugins were updated to pass the endpoint name (I think this is easier to use and it should be preferred for most use cases). I kept the explanation for both approaches in the README.

I took the chance to extend the Travis config to run the tests on Python 3.8 & 3.9. I also tried adding click 8 to the tests, but this version dropped support for Python < 3.6, so the tests on previous Python versions failed (I guess these combinations could be excluded, but that was not trivial so I reverted it).

Fix: #13

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.

Allow with_plugins() to accept a string
1 participant