`Validator.method_source` returns `""` for `property` and `cached_property`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 355
- Forks
- 181
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 3
Description
An interesting detail is that source_file_def_line method takes into account these types of objects and correctly finds the source code of the functions wrapped in these properties.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in numpydoc/validate.py by comparing Validator.method_source with source_file_def_line around lines 313-324. Trace how property and cached_property objects are handled, then verify that method_source reports their wrapped functions' source instead of an empty string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100