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

Thousands separators #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

PeterShinners
Copy link

Python added support for formatting numbers with thousands separators. This works for both floating point and integer numbers. Originally the comma separator was added. In Python 3.6, support for underscore was also added.

This requires limiting the Python versions used, as these
were not added until more recent version of Python.
@PeterShinners
Copy link
Author

Sorry about the CI failure. I don't think they are a result of my changes, but I'm willing to learn.

No configuration was found in your project. Please refer to https://circleci.com/docs/2.0/ to get started with your configuration.

assert new_result == '42,042.042'


@pytest.mark.skipif(sys.version_info < (3, 6), reason="Requires Python 3.6")
Copy link
Author

Choose a reason for hiding this comment

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

Since these changes more recent version of Python, I added a pytest.mark to skip the unsupported versions. If you would prefer a different way of conditionally running tests, let me know.

@PeterShinners
Copy link
Author

I had no luck running main.py locally. I wanted to see the resulting html for myself. To the best of my predictions this will look correct on the generated website.

AttributeError: module '_ast' has no attribute 'Str'

@supRy
Copy link

supRy commented Jul 28, 2020

FYI, see Issue #55

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.

2 participants