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.
I noticed a comment pointing out that when FITS file names are passed for the input data, the file is opened but never closed. Changing that looked like a quick fix, and should be safe---after the file is opened,
parse_input_data
calls itself a few times before eventually extracting the.data
and.header
attributes of the selected HDU and returning those, so the HDUL object never leavesparse_input_data
. (Not sure if the garbage collector would have eventually closed everything anyway.)While checking that this was covered by existing tests, I saw that the
parse_input_data
tests were checking the data array that gets returned but not the corresponding WCS, so I augmented those tests to check both.(The CI failure appears to be pre-existing)