Skip to content

Commit

Permalink
Add red_knot feature
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Jun 11, 2024
1 parent ce6d864 commit 0fba343
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/ruff_python_semantic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ license = { workspace = true }
doctest = false

[dependencies]
ruff_db = { workspace = true }
ruff_db = { workspace = true, optional = true }
ruff_index = { workspace = true }
ruff_python_ast = { workspace = true }
ruff_python_stdlib = { workspace = true }
Expand All @@ -23,12 +23,15 @@ ruff_text_size = { workspace = true }

bitflags = { workspace = true }
is-macro = { workspace = true }
salsa = { workspace = true }
tracing = { workspace = true }
salsa = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
rustc-hash = { workspace = true }

[dev-dependencies]
ruff_python_parser = { workspace = true }

[lints]
workspace = true

[features]
red_knot = ["dep:ruff_db", "dep:salsa", "dep:tracing"]
2 changes: 2 additions & 0 deletions crates/ruff_python_semantic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod analyze;
mod binding;
mod branches;
mod context;
#[cfg(feature = "red_knot")]
mod db;
mod definition;
mod globals;
Expand All @@ -22,4 +23,5 @@ pub use reference::*;
pub use scope::*;
pub use star_import::*;

#[cfg(feature = "red_knot")]
pub use db::{Db, Jar};

0 comments on commit 0fba343

Please sign in to comment.