This repository was archived by the owner on Jul 5, 2023. It is now read-only.
Commit e54f812
authored
Convert negative literals to use unary minus (#9)
Python 2 represents negative numeric literals as Num(n=-NUMBER), but Python 3 represents them as UnaryOp(op=USub(), operand=Num(n=NUMBER)). This commit makes the conversions module actually make this change.
Fixes python/mypy#1788.1 parent 25b7b1f commit e54f812
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
212 | 210 | | |
213 | 211 | | |
214 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
0 commit comments