Package name with hyphens should be converted to underscores
florimondmanca opened this issue · 2 comments
florimondmanca commented
I've just tried creating a Python package named tartiflette-asgi
(:wink:) and the resulting Python package is called tartiflette-asgi
. It should be tartiflette_asgi
because hyphens aren't allowed in Python identifiers.
To be clear, if name
contains hyphens:
- Keep the hyphenized name to create the project folder, project name, etc
- Convert hyphens to underscores when creating the package itself. Use a
.isidentifier()
check to be 100% sure.
FYI, I had to implement a similar thing in Bocadillo CLI; PR is here: bocadilloproject/bocadillo-cli#3
cs01 commented
Yeah this is a problem. Thanks for reporting, and thanks for the PR link.
Python package named tartiflette-asgi
Awesome! You don't waste any time!
cs01 commented
Using cookiecutter instead