Skip to content
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

Support | union types (e.g. T | V) #10

Closed
johnthagen opened this issue Dec 12, 2022 · 2 comments
Closed

Support | union types (e.g. T | V) #10

johnthagen opened this issue Dec 12, 2022 · 2 comments

Comments

@johnthagen
Copy link

johnthagen commented Dec 12, 2022

mkdocs-typer does not support union types expressed with | included in Python 3.10+:

@app.command()
def command(input: int | None) -> None:
    ...

Error:

RuntimeError: Type not yet supported: int | None
@johnthagen johnthagen changed the title Support for generic containers (e.g. tuple[int] | None) Support for | union types (e.g. T | V) Dec 12, 2022
@johnthagen johnthagen changed the title Support for | union types (e.g. T | V) Support for | union types (e.g. T | V) Dec 12, 2022
@johnthagen johnthagen changed the title Support for | union types (e.g. T | V) Support | union types (e.g. T | V) Dec 12, 2022
@johnthagen
Copy link
Author

Related:

@johnthagen
Copy link
Author

This is actually an issue with Typer upstream, so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant