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
How to get better __repr__ / autogenerated docstring for functions with type hints? #99
Comments
Hi @nikolas-claussen , I looked into this and it turns out that the help text does not use However, with some |
Thanks a lot! |
With v2.5.0 this issue should be resolved. Please let me know if you encounter any problems still. |
Hello Ramon,
Thank you so much! Works exactly as I hoped now.
Nikolas
…On Mon, Feb 20, 2023 at 2:01 PM Ramon Hagenaars ***@***.***> wrote:
With v2.5.0
<https://github.com/ramonhagenaars/nptyping/releases/tag/v2.5.0> this
issue should be resolved. Please let me know if you encounter any problems
still.
—
Reply to this email directly, view it on GitHub
<#99 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APUTVVL337QT57BJ4GWL4JDWYPSTZANCNFSM6AAAAAAS754S6U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi there,
Would it be possible to get the type hints in a function definition automatically integrated into the function's docstring and/or string representation? Using the example from the github page, the function
def plan_route(locations: NDArray[Shape["[from, to], [x, y]"], Float]) -> NDArray[Shape["* stops, [x, y]"], Float]: pass
currently has the following
help
string:plan_route(locations: nptyping.base_meta_classes.NDArray) -> nptyping.base_meta_classes.NDArray
which is not very helpful. The desired behavior would be something like:
plan_route(locations: NDArray[Shape["[from, to], [x, y]"], Float]) -> NDArray[Shape["* stops, [x, y]"], Float]
Or is this already supported?
The text was updated successfully, but these errors were encountered: