mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
![]() ## Summary Given a docstring like: ```python def func(x: int, args: tuple[int]): """Toggle the gizmo. Args: x: Some argument. args: Some other arguments. """ ``` We were considering the `args:` descriptor to be an indented docstring section header (since `Args:`) is a valid header name. This led to very confusing diagnostics. This PR makes the parsing a bit more lax in this case, such that if we see a nested header that's more deeply indented than the preceding header, and the preceding section allows sub-items (like `Args:`), we avoid treating the nested item as a section header. Closes https://github.com/astral-sh/ruff/issues/9426. |
||
---|---|---|
.. | ||
extraction.rs | ||
google.rs | ||
mod.rs | ||
numpy.rs | ||
sections.rs | ||
styles.rs |