ruff
91b7a570 - [ty] Implement Python's floor division semantics for `Literal` `int`s (#18249)

Commit
114 days ago
[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.
Author
Parents
Loading