mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00
Implement float literal formatting (#3184)
This commit is contained in:
parent
376eab3a53
commit
ac79bf4ee9
3 changed files with 125 additions and 13 deletions
|
@ -48,13 +48,13 @@ y = 100(no)
|
|||
-x = (123456789e123456789).conjugate()
|
||||
-x = 123456789j.real
|
||||
-x = 123456789.123456789j.__add__(0b1011.bit_length())
|
||||
+x = .1.is_integer()
|
||||
+x = 1..imag
|
||||
+x = 1E+1.imag
|
||||
+x = 1E-1.real
|
||||
+x = 0.1.is_integer()
|
||||
+x = 1.0.imag
|
||||
+x = 1e1.imag
|
||||
+x = 1e-1.real
|
||||
+x = 123456789.123456789.hex()
|
||||
+x = 123456789.123456789E123456789.real
|
||||
+x = 123456789E123456789.conjugate()
|
||||
+x = 123456789.123456789e123456789.real
|
||||
+x = 123456789e123456789.conjugate()
|
||||
+x = 123456789J.real
|
||||
+x = 123456789.123456789J.__add__(0b1011.bit_length())
|
||||
x = 0xB1ACC.conjugate()
|
||||
|
@ -79,13 +79,13 @@ y = 100(no)
|
|||
```py
|
||||
x = 123456789.bit_count()
|
||||
x = (123456).__abs__()
|
||||
x = .1.is_integer()
|
||||
x = 1..imag
|
||||
x = 1E+1.imag
|
||||
x = 1E-1.real
|
||||
x = 0.1.is_integer()
|
||||
x = 1.0.imag
|
||||
x = 1e1.imag
|
||||
x = 1e-1.real
|
||||
x = 123456789.123456789.hex()
|
||||
x = 123456789.123456789E123456789.real
|
||||
x = 123456789E123456789.conjugate()
|
||||
x = 123456789.123456789e123456789.real
|
||||
x = 123456789e123456789.conjugate()
|
||||
x = 123456789J.real
|
||||
x = 123456789.123456789J.__add__(0b1011.bit_length())
|
||||
x = 0xB1ACC.conjugate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue