mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-10-31 12:05:57 +00:00 
			
		
		
		
	|  4a621c2c12 ## Summary We were previously recording wrong reachability constraints for negative branches. Instead of `[cond] AND (NOT [True])` below, we were recording `[cond] AND (NOT ([cond] AND [True]))`, i.e. we were negating not just the last predicate, but the `AND`-ed reachability constraint from last clause. With this fix, we now record the correct constraints for the example from #17723: ```py def _(cond: bool): if cond: # reachability: [cond] if True: # reachability: [cond] AND [True] pass else: # reachability: [cond] AND (NOT [True]) x ``` closes #17723 ## Test Plan * Regression test. * Verified the ecosystem changes | ||
|---|---|---|
| .. | ||
| resources | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| mdtest.py | ||
| mdtest.py.lock | ||