mike bargiel

Results 13 comments of mike bargiel

I just checked and I experience the same behaviour with `Ubuntu 20.04.03` and `python 3.10`

Could you provide some minimal example?

I created a repo that has some examples where typer is ussed inside classes: https://github.com/captainCapitalism/typer-oo-example . It was an answer to Issue #261 In short using decorator will give you...

I checked this out and you are right and wrong. This is wrong: The code references you are showing is related to Arguments and it is not executing with Option...

This is quite big feature that you propose. Do you want to generate documentation based on docstrings? You can check [typer-cli](https://github.com/tiangolo/typer-cli). You could consider other alternative: Moving `typer.Argument(...)`'s somewhere else:...

I have a solution for you. The main problem here is the way Typer knows about command parameters. It uses function signature and type hints. `hi_city` has one parameter of...

You can actually also use the Typer `callback`. It will be less obvious what arguments there are but looks like less code and does not require magic like the above...

Well, you can do something like that: ```python import typer app = typer.Typer() @app.command() def main( arg: str, opt: int = 1 ): print(arg) print(opt) if __name__ == "__main__": app()...

The static method mentioned in your comment is there because otherwise the function would have `self` argument, that would be registered as required and you would need to pass something,...

It is very much intended behaviour. https://typer.tiangolo.com/tutorial/commands/one-or-multiple/ While it can be called inconsistent, it is more of pragrmatic decision. When you have just one command, why would you force user...