A parameter of a public function has no annotation

tx0/python:missing-parameter-annotationstrictnotestyle

What it finds

An annotated parameter tells callers and type checkers what to pass. Checked are the parameters of public functions and methods, as undocumented-function defines them, except self and cls of methods, parameters of functions marked @override or @overload, stubs and test files. Each function is reported once, at its first unannotated parameter.

From the rule's source, missing_parameter_annotation.rs.

Example from the rule's tests
def load(path, mode: str = "r") -> str:tx0 reports: the parameter path of this public function has no annotation    return path  def save(path: str, data: bytes) -> None:    pass  class Store:    def get(self, key: str) -> str:        return key     def put(self, key, value: str) -> None:tx0 reports: the parameter key of this public function has no annotation        pass
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/python:missing-parameter-annotation" = "note"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

# tx0: ignore[tx0/python:missing-parameter-annotation] reason="..."

tx0 explain tx0/python:missing-parameter-annotation shows the same in the terminal. Found a false positive? Report it.