Open
Description
#3114 made me think that we should have a short blurb in the contributors guide on our attrs
usage. I remember it being very confusing when I started contributing, and #3114 adds another pitfall (though thankfully with a test), and tbh I'm still not fully sure myself when to use what.
Possible content:
- why we use attrs in the first place(?)
- that we prefer underscored attribute names, with an
alias
(and why pyright makes thealias
needed) - when to use
slots=False
- when to use
eq=False
- when to use
@frozen
The latter three are fairly common, but not universal, and I have a suspicion that we may not be fully consistent. Addressing the points could include pointing to official attrs docs, issues/PRs discussing pros/cons, or summarizing info that's happened in a lot of different places.