ruff/crates/red_knot_python_semantic
David Peter af988bf866
[red-knot] Detect division-by-zero in unions and intersections (#17157)
## 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
2025-04-02 18:21:27 +02:00
..
resources [red-knot] Detect division-by-zero in unions and intersections (#17157) 2025-04-02 18:21:27 +02:00
src [red-knot] Detect division-by-zero in unions and intersections (#17157) 2025-04-02 18:21:27 +02:00
tests red_knot_test: add support for diagnostic snapshotting 2025-02-05 13:02:54 -05:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml [red-knot] Add a test to ensure that KnownClass::try_from_file_and_name() is kept up to date (#16326) 2025-02-24 12:14:20 +00:00
mdtest.py mdtest.py: do a full mdtest run immediately when the script is executed (#17128) 2025-04-01 19:27:55 +01:00
mdtest.py.lock [red-knot] Markdown test runner (#15632) 2025-01-21 14:06:35 +01:00