fix: match _try_parse("NaN") behaviour with json.parse("NaN") #626
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.
Linked issue(s)
What change does this PR introduce and why?
Before #600,
json.parse
was previously used where_try_parse
is now used.json.parse("NaN")
returns a floatnan
value, while_try_parse("NaN")
currently returns a string"NaN"
. This PR changes the behaviour of_try_parse("NaN")
to match that ofjson.parse("NaN")
, i.e._try_parse("NaN")
is changed to return a floatnan
.This change will resolve this shipyard test failure: https://app.circleci.com/pipelines/github/kolenaIO/shipyard/8026/workflows/eb6a354a-43af-4210-ad28-0d03a7e06032/jobs/149222?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link&utm_content=summary
Please check if the PR fulfills these requirements