mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-09 22:25:09 +00:00

## Summary This PR adds support for a pragma-style header for inline parser tests containing JSON-serialized `ParseOptions`. For example, ```python # parse_options: { "target-version": "3.9" } match 2: case 1: pass ``` The line must start with `# parse_options: ` and then the rest of the (trimmed) line is deserialized into `ParseOptions` used for parsing the the test. ## Test Plan Existing inline tests, plus two new inline tests for `match-before-py310`. --------- Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
42 lines
1.2 KiB
TOML
42 lines
1.2 KiB
TOML
[package]
|
|
name = "ruff_python_parser"
|
|
version = "0.0.0"
|
|
publish = false
|
|
authors = ["Charlie Marsh <charlie.r.marsh@gmail.com>", "RustPython Team"]
|
|
edition = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
homepage = { workspace = true }
|
|
documentation = { workspace = true }
|
|
repository = { workspace = true }
|
|
license = { workspace = true }
|
|
|
|
[lib]
|
|
|
|
[dependencies]
|
|
ruff_python_ast = { workspace = true }
|
|
ruff_python_trivia = { workspace = true }
|
|
ruff_text_size = { workspace = true }
|
|
|
|
bitflags = { workspace = true }
|
|
bstr = { workspace = true }
|
|
compact_str = { workspace = true }
|
|
memchr = { workspace = true }
|
|
rustc-hash = { workspace = true }
|
|
static_assertions = { workspace = true }
|
|
unicode-ident = { workspace = true }
|
|
unicode_names2 = { workspace = true }
|
|
unicode-normalization = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
ruff_annotate_snippets = { workspace = true }
|
|
ruff_python_ast = { workspace = true, features = ["serde"] }
|
|
ruff_source_file = { workspace = true }
|
|
|
|
anyhow = { workspace = true }
|
|
insta = { workspace = true, features = ["glob"] }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
walkdir = { workspace = true }
|
|
|
|
[lints]
|
|
workspace = true
|