✨ Implement list parsing from string with separators - #800
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Hi, thanks for your PR! I'll put this in draft as long as the test suite is failing. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Hi @libklein, I have updated the PR to adhere to the new documentation format, and it is still awaiting further review by Tiangolo. It has been put on our internal review queue. I'd like everyone to refrain from adding additional pings, as that just creates a longer PR thread and generates a lot of noise in our notifications on our end. Instead, if you'd like this PR to be merged, please add an emoticon on the very first post ☝️, which gives us a good idea on how "popular" the idea/PR is. I do realise it can be a bit frustrating to have this PR sit here for so long. There's just a lot of working in maintaining several open-source repo's (Typer, FastAPI, SQLModel, ...) and we do our best to keep up. Thanks for your understanding! 🙏
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
📝 Docs previewLast commit 6afa312 at: https://34e3f5d1.typertiangolo.pages.dev Modified Pages |
…ub.com/libklein/typer into multiple-arguments-via-separated-lists
|
This pull request has a merge conflict that needs to be resolved. |
|
Thanks for the interest and work on this! ☕ I want to implement a few big refactors and features that might solve many of these use cases. I also need to do that before expanding the surface of what is supported with additional external PRs, because that also means I would have to keep maintaining and handling backwards compatibility for those new changes while doing those big refactors. I have not wanted to close PRs that target the same or similar problems before I have an alternative, but then I have left many PRs open for too long, which is not useful or clear either. Sorry for that. And then, after I make those big refactors, the problem might be solved... and if not, a bunch of conflicts will show up, so it will be better and easier to start from scratch (from the new code state). So, I'll close this one for now to keep things clean. For the specific use case, the best would be to document it in a new GitHub Discussion (or 👍 any existing one) with the specific problem to solve (without details of the implementation) to track the feature request. Thank you! 🍰 |
Implements feature #554.
This merge request introduces the functionality to parse List[T] options from strings using a specified separator. An example of how this can be utilized is demonstrated below:
The implementation works by overwriting the
process_valuefunction of the click parser, doing string splitting before forwarding the result to click. This ensures full compatibility with the existing features of both Click and Typer. The feature does not allow whitespace only separators to avoid ambiguities.Feedback is much appreciated!
Open questions:
typer.Option, which delays error detection until the command execution. Should we consider moving this error handling to theOptionInfoconstructor to allow for earlier failure detection?ToDo: