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

Metric.read should support PEP 604 syntax for Optional types #89

Open
Tracked by #104
msto opened this issue Feb 9, 2024 · 0 comments · May be fixed by #168
Open
Tracked by #104

Metric.read should support PEP 604 syntax for Optional types #89

msto opened this issue Feb 9, 2024 · 0 comments · May be fixed by #168
Assignees
Labels
enhancement New feature or request

Comments

@msto
Copy link
Contributor

msto commented Feb 9, 2024

Currently, annotating an attribute as Optional[str] works, but annotating the same attribute as str | None results in the following error when trying to read an empty field

AssertionError: Do not know how to convert string to str | None for value:
@msto msto changed the title Metric.read should support new type hint syntax for Optionals Metric.read should support PEP 604 syntax for Optional types Apr 17, 2024
@msto msto mentioned this issue Apr 17, 2024
6 tasks
@nh13 nh13 added the enhancement New feature or request label Jul 13, 2024
@nh13 nh13 self-assigned this Jul 19, 2024
nh13 added a commit that referenced this issue Jul 19, 2024
@nh13 nh13 linked a pull request Jul 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants