Describe the bug
Typer does not seem to be compatible with uppercase lettered arguments.
To Reproduce
Steps to reproduce the behavior with a minimum self-contained file.
Replace each part with your own scenario:
- Create a file
main.py with:
import typer
app = typer.Typer()
@app.command()
def f(var_with_UPPERCASE: int, lowercase_var: int):
return var_with_UPPERCASE + lowercase_var
app()
TypeError: f() got an unexpected keyword argument 'var_with_uppercase'
- But I expected it to output:
Expected behavior
Typer should preserve the variable case.
Additional context
I suspect this is related to Typer's name mangling with underscores, which always turns the variable to lower case? I think a more robust solution is to allow any case + "_"/"-" combinations, or at least an option in Typer(...) to enable this feature will be great!
Describe the bug
Typer does not seem to be compatible with uppercase lettered arguments.
To Reproduce
Steps to reproduce the behavior with a minimum self-contained file.
Replace each part with your own scenario:
main.pywith:Expected behavior
Typer should preserve the variable case.
Additional context
I suspect this is related to Typer's name mangling with underscores, which always turns the variable to lower case? I think a more robust solution is to allow any case + "_"/"-" combinations, or at least an option in
Typer(...)to enable this feature will be great!