-
Notifications
You must be signed in to change notification settings - Fork 101
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
Type hints for derived quantities #1801
Conversation
I had to change the docstrings to raw docstrings ( |
This is broadly failing the oldestdeps. I haven't tracked it down, but it might be something we table until we update the oldest astropy. |
So I think the issue with the older astropy is a conflict between the quantities decorator and typehints decorator for the return types. e.g.,
seems to fail with the older astropy since it interprets the return type for a return unit. Without the
and specify the units for the return rather than the type/class. Probably this is OK and combining the unit checking with type hints is still a net positive, but we might want to check back on this when we update oldestdeps to see if we can make it more uniform. |
Using the older syntax for combining type hints and quantity input since we still support old astropy (#1709)