Make addition of ephemeris note more obvious and explicit.#11594
Merged
StuartLittlefair merged 1 commit intoApr 19, 2021
Conversation
Closed
nstarman
reviewed
Apr 18, 2021
Comment on lines
+512
to
+513
| for f in [f for f in locals().values() if callable(f) and f.__doc__ is not None | ||
| and '{_EPHEMERIS_NOTE}' in f.__doc__]: |
Member
There was a problem hiding this comment.
I've also long wished python would allow for the comprehension syntax
for f in locals().values() if (...):
...
Contributor
Author
There was a problem hiding this comment.
Here, the main reason I did the list comprehension there is that I cannot just iterate over locals.values() anyway (I guess since I define f). But yet, the comprehension syntax there would make things just a little more compact and less indented.
StuartLittlefair
approved these changes
Apr 19, 2021
Contributor
|
thanks @mhvk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small change in how we add a note about the ephemeris to functions in
solar_system. This is partially as currently, the docstrings give no indication that an addition is going to happen, which leaves oddly orphan "Notes" sections (which trip auto-checkers like the one in #11590). But I must admit I had hoped one could use f-strings for docstrings - sadly, this is not possible. Still, I think this PR makes things a little clearer.