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

Add support for ints and floats comprised of unicode decimal strings. #54

Merged

Conversation

SethMMorton
Copy link
Owner

@SethMMorton SethMMorton commented Apr 11, 2018

In order to fully support all numbers that the built-in int and float support, the regular expressions used to split input strings have been updated to support a wider variety of numbers.

Accepting this will close #52.

The tracebacks were just too long and it made debugging hard.
The regular expressions to separate numbers from non-numbers
has been updated to accept more than just ASCII numbers.
The behavior of fake_fastnumbers was not matching that of
fastnumbers, which was to allow conversion of strings such as
"۱۲" to 12. This has been corrected.
@codecov
Copy link

codecov bot commented Apr 11, 2018

Codecov Report

Merging #54 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
+ Coverage   99.65%   99.65%   +<.01%     
==========================================
  Files          10       10              
  Lines         574      581       +7     
==========================================
+ Hits          572      579       +7     
  Misses          2        2
Impacted Files Coverage Δ
natsort/unicode_numbers.py 100% <100%> (ø) ⬆️
natsort/utils.py 100% <100%> (ø) ⬆️
natsort/compat/fake_fastnumbers.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a79db8...5f0abd8. Read the comment docs.

@SethMMorton SethMMorton merged commit 68ed807 into master Apr 21, 2018
@SethMMorton SethMMorton deleted the 52-sorting-arabic-farsi-or-hebrew-numbers-is-not-natural branch April 21, 2018 03:10
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.

Sorting arabic, farsi or hebrew numbers is not "natural"
1 participant