-
Notifications
You must be signed in to change notification settings - Fork 760
feat: Exposes types if they are explicitly declared by the user #4720
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
or Maybe we define the type alias: Edges: TypeAlias = tuple[Any, ...] | ActualReturnType@app.cell
def foo(myvar: int) -> marimo.Edges:
...I think the ActualReturnType is HTML output right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The signature for arguments looks good! Nice surgical change, too.
If you are unsure about the return signature, how about we only add types for arguments right now?
|
Thanks! So call just returns the value from run which gets processed by mime, but maybe ideally it should be the raw value (I'd argue this for run as well) the alias would then maybe be better as marimo.Output[type] # are generics supported in 3.9?But I don't think return type are all that important. For some reason, linters don't ask for return types on decorated pytests- I wonder what their decorators do that suppresses it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great — not sure what's going on with CI though?
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.13.3-dev42 |
📝 Summary
on reference or definition, will carry its annotation in the signature
couple other notes:
-> Nonefor blank returns, but it looks like a pretty noisy change.@akshayka