mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00

## Summary Given: ```python from somewhere import get_cfg def lookup_cfg(cfg_description): cfg = get_cfg(cfg_description) if cfg is not None: return cfg raise AttributeError(f"No cfg found matching {cfg_description}") ``` We were analyzing the method from last-to-first statement. So we saw the `raise`, then assumed the method _always_ raised. In reality, though, it _might_ return. This PR improves the branch analysis to respect these mixed cases. Closes https://github.com/astral-sh/ruff/issues/9269. Closes https://github.com/astral-sh/ruff/issues/9304.
8 lines
150 B
Rust
8 lines
150 B
Rust
pub mod class;
|
|
pub mod function_type;
|
|
pub mod imports;
|
|
pub mod logging;
|
|
pub mod terminal;
|
|
pub mod type_inference;
|
|
pub mod typing;
|
|
pub mod visibility;
|