mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00

## Summary Fixes some TODOs introduced in https://github.com/astral-sh/ruff/pull/6538. In short, given an expression like `1 if x > 0 else "Hello, world!"`, we now return a union type that says the expression can resolve to either an `int` or a `str`. The system remains very limited, it only works for obvious primitive types, and there's no attempt to do inference on any more complex variables. (If any expression yields `Unknown` or `TypeError`, we propagate that result throughout and abort on the client's end.)
29 lines
816 B
TOML
29 lines
816 B
TOML
[package]
|
|
name = "ruff_python_semantic"
|
|
version = "0.0.0"
|
|
publish = false
|
|
authors = { workspace = true }
|
|
edition = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
homepage = { workspace = true }
|
|
documentation = { workspace = true }
|
|
repository = { workspace = true }
|
|
license = { workspace = true }
|
|
|
|
[lib]
|
|
|
|
[dependencies]
|
|
ruff_index = { path = "../ruff_index" }
|
|
ruff_python_ast = { path = "../ruff_python_ast" }
|
|
ruff_python_stdlib = { path = "../ruff_python_stdlib" }
|
|
ruff_source_file = { path = "../ruff_source_file" }
|
|
ruff_text_size = { path = "../ruff_text_size" }
|
|
|
|
bitflags = { workspace = true }
|
|
is-macro = { workspace = true }
|
|
num-traits = { workspace = true }
|
|
rustc-hash = { workspace = true }
|
|
smallvec = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
ruff_python_parser = { path = "../ruff_python_parser" }
|