You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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 the alias 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.
The text was updated successfully, but these errors were encountered:
Maybe we should have a tiny flake8 plugin or grep command in CI to check for that? And we should also report it upstream to pyright, the best fix would be there.
Maybe we should have a tiny flake8 plugin or grep command in CI to check for that? And we should also report it upstream to pyright, the best fix would be there.
#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:
alias
(and why pyright makes thealias
needed)slots=False
eq=False
@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.
The text was updated successfully, but these errors were encountered: