ruff/crates/ruff_linter/src/rules
Auguste Lalande 03696687ea
[`pydoclint`] Implement `docstring-extraneous-parameter` (`DOC102`) (#20376)
## Summary

Implement `docstring-extraneous-parameter` (`DOC102`). This rule checks
that all parameters present in a functions docstring are also present in
its signature.

Split from #13280, per this
[comment](https://github.com/astral-sh/ruff/pull/13280#issuecomment-3280575506).

Part of #12434.

## Test Plan

Test cases added.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2025-10-16 11:26:51 -04:00
..
airflow [`airflow`] Add warning to `airflow.datasets.DatasetEvent` usage (`AIR301`) (#20551) 2025-10-15 12:19:55 -04:00
eradicate Show fixes by default (#19919) 2025-08-29 09:53:05 -04:00
fastapi [`fastapi`] Fix false positives for path parameters that FastAPI doesn't recognize (`FAST003`) (#20687) 2025-10-09 16:10:21 -04:00
flake8_2020 Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_annotations [`flake8-annotations`] Fix return type annotations to handle shadowed builtin symbols (`ANN201`, `ANN202`, `ANN204`, `ANN205`, `ANN206`) (#20612) 2025-10-02 22:44:06 +00:00
flake8_async [`flake8-async`] Implement `blocking-path-method` (`ASYNC240`) (#20264) 2025-09-23 08:30:47 -04:00
flake8_bandit Fix false negatives in `Truthiness::from_expr` for lambdas, generators, and f-strings (#20704) 2025-10-14 03:06:17 -05:00
flake8_blind_except [`flake8-blind-except`] Fix `BLE001` false-positive on `raise ... from None` (#19755) 2025-08-13 13:01:47 -04:00
flake8_boolean_trap Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_bugbear [`flake8-bugbear`] Omit annotation in preview fix for `B006` (#20877) 2025-10-15 01:14:01 +00:00
flake8_builtins Update default and latest Python versions for 3.14 (#20725) 2025-10-07 12:23:11 -04:00
flake8_commas Track t-strings and f-strings for token-based rules and suppression comments (#20357) 2025-09-12 13:00:12 -05:00
flake8_comprehensions [`flake8-comprehensions`] Clarify fix safety documentation (`C413`) (#20640) 2025-10-03 09:23:57 -05:00
flake8_copyright Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_datetimez [`flake8-datetimez`] Clarify docs for several rules (#20778) 2025-10-10 13:02:24 +00:00
flake8_debugger Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_django Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_errmsg [`flake8-errmsg`] Stabilize extending `raw-string-in-exception` (`EM101`) to support byte strings (#20273) 2025-09-10 09:00:27 -04:00
flake8_executable Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_fixme Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_future_annotations [`ruff`] Extend FA102 with listed PEP 585-compatible APIs (#20659) 2025-10-03 09:45:32 -04:00
flake8_gettext Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_implicit_str_concat Improved error recovery for unclosed strings (including f- and t-strings) (#20848) 2025-10-15 09:50:56 +02:00
flake8_import_conventions Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_logging Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_logging_format [`flake8-logging-format`] Avoid dropping implicitly concatenated pieces in the `G004` fix (#20793) 2025-10-09 18:14:38 -04:00
flake8_no_pep420 include `.pyw` files by default when linting and formatting (#20458) 2025-09-24 08:39:30 -07:00
flake8_pie Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_print Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_pyi [`flake8-pyi`] Fix operator precedence by adding parentheses when needed (`PYI061`) (#20508) 2025-10-15 15:06:03 +00:00
flake8_pytest_style [`ruff`] Use DiagnosticTag for more flake8 and numpy rules (#20758) 2025-10-13 10:29:15 +02:00
flake8_quotes Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_raise Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_return Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_self Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_simplify Fix false negatives in `Truthiness::from_expr` for lambdas, generators, and f-strings (#20704) 2025-10-14 03:06:17 -05:00
flake8_slots Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
flake8_tidy_imports Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_todos Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
flake8_type_checking Update default and latest Python versions for 3.14 (#20725) 2025-10-07 12:23:11 -04:00
flake8_unused_arguments [`ruff`] Use DiagnosticTag for more flake8 and numpy rules (#20758) 2025-10-13 10:29:15 +02:00
flake8_use_pathlib Update default and latest Python versions for 3.14 (#20725) 2025-10-07 12:23:11 -04:00
flynt [`flynt`] Fix f-string quoting for mixed quote joiners (`FLY002`) (#20662) 2025-10-03 09:15:57 -04:00
isort [`isort`] Fix inserting required imports before future imports (`I002`) (#20676) 2025-10-06 13:40:36 +00:00
mccabe Move full diagnostic rendering to `ruff_db` (#19415) 2025-08-08 12:56:23 -04:00
numpy [`ruff`] Use DiagnosticTag for more flake8 and numpy rules (#20758) 2025-10-13 10:29:15 +02:00
pandas_vet [`pandas-vet`] Remove `pandas-df-variable-name` (`PD901`) (#19223) 2025-09-10 09:00:27 -04:00
pep8_naming Allow the `if_not_else` Clippy lint 2025-09-09 08:49:25 -04:00
perflint [`perflint`] Handle tuples in dictionary comprehensions (`PERF403`) (#19934) 2025-08-28 21:37:40 +00:00
pycodestyle Update rust toolchain to 1.90 (#20469) 2025-09-18 16:54:49 +02:00
pydoclint [`pydoclint`] Implement `docstring-extraneous-parameter` (`DOC102`) (#20376) 2025-10-16 11:26:51 -04:00
pydocstyle Use new diff rendering format in tests (#20101) 2025-08-28 10:56:58 -04:00
pyflakes [syntax-errors]: implement F702 as semantic syntax error (#20869) 2025-10-15 19:27:15 +00:00
pygrep_hooks [`pygrep_hooks`] Stabilize using`AsyncMock` methods in `invalid-mock-access` (`PGH005`) (#20272) 2025-09-10 09:00:27 -04:00
pylint Improved error recovery for unclosed strings (including f- and t-strings) (#20848) 2025-10-15 09:50:56 +02:00
pyupgrade [`pyupgrade`] Fix false negative for `TypeVar` with default argument in `non-pep695-generic-class` (`UP046`) (#20660) 2025-10-15 14:51:55 +00:00
refurb [`refurb`] Add fixes for `FURB101`, `FURB103` (#20520) 2025-10-06 18:09:07 -04:00
ruff fix(docs): Fix typo in `RUF015` description (#20873) 2025-10-14 21:38:31 +00:00
tryceratops Fixed documentation for try_consider_else (#20587) 2025-09-27 13:50:51 +00:00
mod.rs Re-enable clippy `useless-format` (#14095) 2024-11-04 18:25:25 +01:00