python-attrs / python-attrs/attrs

Mechanism for adding per-attribute docstrings to __slots__

Open
#1,294 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
5.8k
Forks
480
Avg merge
2h 15m
Merged PRs (30d)
2

Description

Python 3.9 added the ability to generate per-attribute docstrings on attributes in slots that are parsed by inspect.getdoc() and help by passing a dict to __slots__.

Since attrs can create slots, it would be great if there was a mechanism to follow this behavior.

Contributor guide

Open the contributing guide

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.

Research direction

Review attrs' slot-generation path and Python 3.9 dict-form slots behavior, using inspect.getdoc() and help as the observable behavior. Determine how per-attribute documentation should be supplied and verified. Done means attrs-created slots expose the requested attribute docstrings without breaking existing slot generation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.