Commit Graph

7 Commits

Author SHA1 Message Date
Casper Weiss Bang
7d032fa848
Use lowercase hex numbers fixes #1692 (#1775)
* Made hex lower case

* Refactored numeric formatting section

* Redid some refactoring and removed bloat

* Removed additions from test_requirements.txt

* Primer now expects expected changes

* Undid some refactoring

* added to changelog

* Update src/black/__init__.py

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
Co-authored-by: Cooper Lees <me@cooperlees.com>
2020-11-13 07:25:17 -08:00
Zsolt Dollenstein
250ba7f04b Remove numeric underscore normalization (#696) 2019-02-06 19:16:49 -08:00
Zsolt Dollenstein
5f9eb9e4f7 Add underscores to numeric literals with more than six digits (#529) 2018-09-26 12:32:11 +01:00
Zsolt Dollenstein
bbf38400ce Uppercase digits in hex literals (#530) 2018-09-25 16:01:56 +01:00
Jelle Zijlstra
a37abdcbc5
change some numeric behavior (#469) 2018-08-23 11:55:29 -07:00
Jelle Zijlstra
d4f0521754
fix misformatting of floats with leading zeros (#464) 2018-08-20 08:19:25 -07:00
Jelle Zijlstra
cc48bc56ca normalize numeric literals (#454)
Fixes #452

I ended up making a couple of other normalizations to numeric literals
too (lowercase everything, don't allow leading or trailing . in floats,
remove redundant + sign in exponent). I don't care too much about those,
so I'm happy to change the behavior there.

For reference, here is Python's grammar for numeric literals:
https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
2018-08-17 15:03:58 +01:00