ruff
ee5b07d4 - Skip empty lines when determining base indentation (#9795)

Commit
1 year ago
Skip empty lines when determining base indentation (#9795) ## 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`
Author
Parents
Loading