Alex Waygood
dec1d2e8fc
ZeroDivisionError for `complex` too
2025-07-14 17:54:58 +01:00
Alex Waygood
3aa91a853e
add tests for bools and make helper method private
2025-07-14 17:48:16 +01:00
Alex Waygood
59570beb57
combine the two rules
2025-07-14 17:48:11 +01:00
Brandt Bucher
0006df9292
Fix unrelated negation edge case
2025-07-14 17:46:32 +01:00
Brandt Bucher
14aa8bb871
...of *course* the issue's with my Python code...
2025-07-14 17:46:32 +01:00
Brandt Bucher
2882840abc
Check shifts of literals ints
2025-07-14 17:46:32 +01:00
Brandt Bucher
91b7a570c2
[ty] Implement Python's floor division semantics for `Literal` `int`s ( #18249 )
...
Division works differently in Python than in Rust. If the result is
negative and there is a remainder, the division rounds down (instead of
towards zero). The remainder needs to be adjusted to compensate so that
`(lhs // rhs) * rhs + (lhs % rhs) == lhs`.
Fixes astral-sh/ty#481 .
2025-05-22 10:42:29 -04:00
Alex Waygood
67cd94ed64
[ty] Add missing bitwise-operator branches for boolean and integer arithmetic ( #17949 )
2025-05-08 14:10:35 +01:00
Micha Reiser
b51c4f82ea
Rename Red Knot ( #17820 )
2025-05-03 19:49:15 +02:00