mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00

## Summary The motivation here is that it will make this rule easier to rewrite as a deferred check. Right now, we can't run this rule in the deferred phase, because it depends on the `except_handler` to power its autofix. Instead of lexing the `except_handler`, we can use the `SimpleTokenizer` from the formatter, and just lex forwards and backwards. For context, this rule detects the unused `e` in: ```python try: pass except ValueError as e: pass ```
22 lines
474 B
TOML
22 lines
474 B
TOML
[package]
|
|
name = "ruff_python_whitespace"
|
|
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_text_size = { workspace = true }
|
|
|
|
memchr = { workspace = true }
|
|
unic-ucd-ident = "0.9.0"
|
|
|
|
[dev-dependencies]
|
|
insta = { workspace = true }
|