mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
![]() ## Summary It turns out we saw a panic in cases when dedenting blocks like the `def wrapper` here: ```python def instrument_url(f: UrlFuncT) -> UrlFuncT: # TODO: Type this with ParamSpec to preserve the function signature. if not INSTRUMENTING: # nocoverage -- option is always enabled; should we remove? return f else: def wrapper( self: "ZulipTestCase", url: str, info: object = {}, **kwargs: Union[bool, str] ) -> HttpResponseBase: ``` Since we relied on the first line to determine the indentation, instead of the first non-empty line. ## Test Plan `cargo test` |
||
---|---|---|
.. | ||
snapshots | ||
comment_ranges.rs | ||
cursor.rs | ||
lib.rs | ||
pragmas.rs | ||
textwrap.rs | ||
tokenizer.rs | ||
whitespace.rs |