-
Notifications
You must be signed in to change notification settings - Fork 0
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
In the scaffolder, handle application and endpoint names with Python module-unfriendly characters like hyphens #40
Conversation
Connexion 3.0.6 contains a breaking change from 3.0.5, causing the tests to fail. I'm looking into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new argparse types are pretty sneaky - I like it!
I will be making a new I should note I'm not particularly happy with the names. Any suggestions? |
The issue is a breaking change in Starlette 0.35.0 from PR encode/starlette#2377. It turns out Starlette returning a host:port is not required by the ASGI spec, so it was decided to instead return |
Closes #38
…-change Fix test failure from breaking change in Starlette
Using hyphens, spaces, etc. in the arguments for endpoint names or the application name when using
bl-python-scaffold
will cause invalid Python modules to generate. This PR fixes the problems by normalizing the names:_
, including spaceThis PR adds a new
argparse
module toBL_Python.programming
with the following functionality:DisallowDuplicateValues
is an argparse Action used to prevent repeated arguments from containing the same valuesassociate_disallow_duplicate_values
is an argparse Action that behaves the same asDisallowDuplicateValues
, but associates the argument with another argument's valuedisallow
allows argparse to error when an argument is in a list of valuesCloses #38
Closes #41