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.
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
In xarray#7494 the
_contains_cftime_datetimes
function was restricted to Variable objects. We were passing a DataArray toxr.conventions.encode_cf_variable
, which was passing it (assuming a variable) to that function. Since the PR, this raises an error.In a way, this is my error because the
encode_cf_variable
clearly documents that its input should be a Variable, although there were not annotations at the time I implemented that line.Moreover, we were not testing this code... It depended on the
sdba_encode_cf
option being activated, but no test was activating it.This PR passes
Variable
instances were it should and enables the option in one of the test where it makes sense.Does this PR introduce a breaking change?
No.
Other information:
Fixes xscen#175.