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

refactor(yaml): cleanup dead code in float Type implementation #5526

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Jul 23, 2024

According to the spec, it seems that the float type shouldn't contain a : (see https://yaml.org/spec/1.2.2/#10214-floating-point).

@iuioiua iuioiua requested a review from kt3k as a code owner July 23, 2024 09:51
@iuioiua iuioiua enabled auto-merge (squash) July 23, 2024 09:51
@github-actions github-actions bot added the yaml label Jul 23, 2024
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.39%. Comparing base (d6dde6f) to head (2e8d132).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5526      +/-   ##
==========================================
+ Coverage   96.36%   96.39%   +0.02%     
==========================================
  Files         465      465              
  Lines       37760    37747      -13     
  Branches     5578     5576       -2     
==========================================
- Hits        36388    36386       -2     
+ Misses       1330     1319      -11     
  Partials       42       42              

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

@kt3k
Copy link
Member

kt3k commented Jul 24, 2024

colon separated numbers are sexagesimals (1:00 equals 60 as int, also 1:00.0 equals 60.0 as float). It was part of spec in YAML 1.1. ref: https://yaml.org/type/float.html, but it seems to have been dropped in 1.2. Probably it's fine to remove as we mainly target 1.2

BTW we already tests sexagesimals for int types. Probably we should remove them as well for consistency

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iuioiua iuioiua merged commit ff2f1f1 into main Jul 24, 2024
16 checks passed
@iuioiua iuioiua deleted the yaml-clean-float branch July 24, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants