mirror of https://github.com/astral-sh/ruff
## Summary This review contains a fix for [D405](https://docs.astral.sh/ruff/rules/capitalize-section-name/) (capitalize-section-name) The problem is that Ruff considers the sub-section header as a normal section if it has the same name as some section name. For instance, a function/method has an argument named "parameters". This only applies if you use Numpy style docstring. See: [ISSUE](https://github.com/astral-sh/ruff/issues/9806) The following will not raise D405 after the fix: ```python def some_function(parameters: list[str]): """A function with a parameters parameter Parameters ---------- parameters: A list of string parameters """ ... ``` ## Test Plan ```bash cargo test ``` --------- Co-authored-by: Mikko Leppänen <mikko.leppanen@vaisala.com> Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com> |
||
|---|---|---|
| .. | ||
| D104 | ||
| _unrelated | ||
| D.py | ||
| D100.ipynb | ||
| D200.py | ||
| D202.py | ||
| D208.py | ||
| D209_D400.py | ||
| D214_module.py | ||
| D215.py | ||
| D300.py | ||
| D301.py | ||
| D400.py | ||
| D401.py | ||
| D403.py | ||
| D410.py | ||
| D413.py | ||
| D417.py | ||
| all.py | ||
| bom.py | ||
| canonical_google_examples.py | ||
| canonical_numpy_examples.py | ||
| sections.py | ||
| setter.py | ||