mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
![]() ## Summary With this PR, we emit a diagnostic for this case where previously didn't: ```py from typing import Literal def f(m: int, n: Literal[-1, 0, 1]): # error: [division-by-zero] "Cannot divide object of type `int` by zero" return m / n ``` ## Test Plan New Markdown test |
||
---|---|---|
.. | ||
booleans.md | ||
classes.md | ||
custom.md | ||
instances.md | ||
integers.md | ||
tuples.md | ||
unions.md |