Skip to content
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

fix: match _try_parse("NaN") behaviour with json.parse("NaN") #626

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

kevinguo455
Copy link
Contributor

@kevinguo455 kevinguo455 commented Jun 25, 2024

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 float nan value, while _try_parse("NaN") currently returns a string "NaN". This PR changes the behaviour of _try_parse("NaN") to match that of json.parse("NaN"), i.e. _try_parse("NaN") is changed to return a float nan.

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

  • Include reference to internal ticket and/or GitHub issue "Fixes #NNNN" (if applicable)
  • Relevant tests for the changes have been added
  • Relevant docs have been added / updated

@kevinguo455 kevinguo455 requested a review from a team as a code owner June 25, 2024 00:07
@kevinguo455 kevinguo455 force-pushed the kevin/match-json-parse-NaN-behaviour branch from cebea7a to 01af84f Compare June 26, 2024 17:58
@kevinguo455 kevinguo455 requested a review from diegokolena June 26, 2024 17:59
@kevinguo455 kevinguo455 force-pushed the kevin/match-json-parse-NaN-behaviour branch from 01af84f to fd8b699 Compare June 27, 2024 18:00
@kevinguo455 kevinguo455 force-pushed the kevin/match-json-parse-NaN-behaviour branch from fd8b699 to f230eeb Compare July 3, 2024 16:06
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.49%. Comparing base (2cbe05d) to head (f230eeb).

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk     #626   +/-   ##
=======================================
  Coverage   94.49%   94.49%           
=======================================
  Files          86       86           
  Lines        5395     5397    +2     
  Branches      791      792    +1     
=======================================
+ Hits         5098     5100    +2     
  Misses        220      220           
  Partials       77       77           
Flag Coverage Δ
integration 76.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kevinguo455 kevinguo455 merged commit 0285b43 into trunk Jul 3, 2024
57 checks passed
@kevinguo455 kevinguo455 deleted the kevin/match-json-parse-NaN-behaviour branch July 3, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants