signature-annotations
LintProse flags a signature parameter or a value-returning function that carries no
A written -> None on a function that returns nothing is visual weight the signature does not need. The omission convention already reads an absent return annotation as a function that returns nothing, leaving the explicit form as noise rather than information.
The rewrite is purely mechanical. It fires only when the return annotation is a bare None, leaving a None nested inside a larger annotation (int | None, Callable[..., None]) and every parameter annotation untouched. The companion
| Key | Type | Default | Meaning |
|---|---|---|---|
enabled | bool | true | Toggle the rule on or off |
An explicit -> None return
def configure():
load_settings()
def reset(state):
state.clear()
A -> (None) return
An async def and an __init__ method each lose their redundant -> None return
A -> int | None and a -> Callable[..., None] keep their None.
Prose flags a signature parameter or a value-returning function that carries no
Prose normalizes function signatures to one line or one parameter per line, gated by line length and inline-parameter count.
Prose removes from __future__ import annotations lines that no longer carry their weight on the target Python version.
For per-line opt-outs, the Suppression chapter covers the # prose: skip[strip-none-return] directive.