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

Use typing.Annotated[mypy_compatible_type, funsor_metadata] #521

Open
fritzo opened this issue Apr 8, 2021 · 0 comments
Open

Use typing.Annotated[mypy_compatible_type, funsor_metadata] #521

fritzo opened this issue Apr 8, 2021 · 0 comments

Comments

@fritzo
Copy link
Member

fritzo commented Apr 8, 2021

PEP 593 and Python 3.9 introduce a type Annotated[type_, metadata], and this might allow our make_op() and make_funsor() annotations compatible with typecheckers like mypy.

For example usage, see https://github.com/patrick-kidger/torchtyping

@fritzo fritzo added the refactor label Apr 8, 2021
@fritzo fritzo changed the title Use typing.Annotated[mypy_compatible_type, funsor_metadata] in make_funsor() Use typing.Annotated[mypy_compatible_type, funsor_metadata] Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant