Allow with_plugins()
to accept a string
#33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for passing an endpoint name to
with_plugins()
, as proposed in #13:plugins
parameter is a string, it's interpreted as an endpoint name andpkg_resources.iter_entry_points()
is called automatically. This should be backwards compatible.test_register_and_run
is run for both the originalgood_cli
and the newgood_cli_by_name
.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