Skip to content

Describe our attrs usage in contributor guide #3116

Open
@jakkdl

Description

@jakkdl

#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:

  1. why we use attrs in the first place(?)
  2. that we prefer underscored attribute names, with an alias (and why pyright makes the alias needed)
  3. when to use slots=False
  4. when to use eq=False
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions