Don't require ``RT01`` for properties

Open Beginner friendly
#714 1 comment 0 reactions 0 assignees View on GitHub

@Nani-2007-code is already working on this.

Since Oct 27, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
devtools

Research direction

Start from the RT01 check in numpydoc's docstring validation and find where it decides a Returns section is required. Check how the existing # numpydoc ignore= mechanism is handled, then find a way to recognise @property and @cached_property decorated functions. Done when a property without a Returns section passes RT01 while ordinary functions are still flagged. Confirm the expected behaviour with maintainers first, since the issue leaves the detection approach open.

Written by the indexing model from the issue text.

Description

Properties (@property and @cached_property) are intended to look like an attribute instead of a method. As such there should be no Returns section in their documentation. My problem is that when activating the RT01 rule, all the properties are flagged and I have to # numpydoc ignore=RT01 each one mannually. Is it possible to not flag properties when using this rule ?

Dominant language
Python
Stars
354
Forks
185
Avg merge
4m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from numpy/numpydoc

All issues in numpy/numpydoc

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.