ruff/crates/ruff_python_formatter/Cargo.toml
konsti 1031bb6550
Formatter: Add SourceType to context to enable special formatting for stub files (#6331)
**Summary** This adds the information whether we're in a .py python
source file or in a .pyi stub file to enable people working on #5822 and
related issues.

I'm not completely happy with `Default` for something that depends on
the input.

**Test Plan** None, this is currently unused, i'm leaving this to first
implementation of stub file specific formatting.

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
2023-08-04 11:52:26 +00:00

50 lines
1.5 KiB
TOML

[package]
name = "ruff_python_formatter"
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 }
[dependencies]
ruff_formatter = { path = "../ruff_formatter" }
ruff_python_trivia = { path = "../ruff_python_trivia" }
ruff_source_file = { path = "../ruff_source_file" }
ruff_python_ast = { path = "../ruff_python_ast" }
ruff_python_index = { path = "../ruff_python_index" }
ruff_python_parser = { path = "../ruff_python_parser" }
ruff_text_size = { path = "../ruff_text_size" }
anyhow = { workspace = true }
bitflags = { workspace = true }
clap = { workspace = true }
countme = "3.0.1"
is-macro = { workspace = true }
itertools = { workspace = true }
once_cell = { workspace = true }
rustc-hash = { workspace = true }
serde = { workspace = true, optional = true }
smallvec = { workspace = true }
thiserror = { workspace = true }
[dev-dependencies]
ruff_formatter = { path = "../ruff_formatter", features = ["serde"] }
insta = { workspace = true, features = ["glob"] }
serde = { workspace = true }
serde_json = { workspace = true }
similar = { workspace = true }
[[test]]
name = "ruff_python_formatter_fixtures"
path = "tests/fixtures.rs"
test = true
required-features = ["serde"]
[features]
serde = ["dep:serde", "ruff_formatter/serde", "ruff_source_file/serde", "ruff_python_ast/serde"]
default = ["serde"]