-
Notifications
You must be signed in to change notification settings - Fork 518
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
Fixing the float resolver #591
Conversation
Adding optional plus and minus operators after scientific notation in the float resolver
As you can see here http://yaml.org/type/float.html , for the YAML 1.1 float type the sign is not optional, and PyYAML implements YAML 1.1. |
The PR tests are failing locally for me:
Not sure why github actions succeed. @nitzmahone any idea? I'm having trouble again finding the part where the actual tests are run :) |
There are several places where I can find failing tests, but they do not result in a failing workflow step: https://github.com/yaml/pyyaml/runs/4393221891?check_suite_focus=true#step:6:726 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for closing, see my comments.
But it should be investigated why the test failures didn't show up as failures.
sigh just looked- because the ancient homegrown test runner isn't returning a nonzero exit code on test failures... Yet another reason to standardize: #588 |
Adding optional plus and minus operators after scientific notation in the float resolver.
In some programming languages, scientific notation is represented without the "+" operator.
For example , in the Scala programming language , floating-point numbers and scientific notation look like this:
And if the yaml file was generated via Scala, and then parsed by the PyYAML library, then this number is perceived as a string.
I made a minor correction that adds the optional operators after scientific notation.