-
-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Labels
ThinkingNeeds more braining.Needs more braining.
Milestone
Description
This is the issue to discuss the defaults and behavior of attr.define()
, attr.mutable()
, and attr.frozen()
before they are finalized inside the new attrs
namespace.
Feedback that we find justified will be spun out into separate issues.
Known issues:
- mypy doesn't know about the new-style APIs yet and there's nothing we can do about it. However you can use this mypy plugin for now (for more details see https://www.attrs.org/en/stable/extending.html#wrapping-the-decorator). PR is submitted in Add support for next-gen attrs API python/mypy#9396.
__eq__
and__ne__
aren't correctly auto-detected (fixed) @attr.define fails to auto-detect __eq__ #670- Unannotated attributes fail if
define
is called with arguments/parantheses (fixed) Hybrid behavior doesn't work when maybe_cls=None and no annotations #673 - Inheriting from frozen classes requires to manually set
on_setattr
to None (fixed). Feedback to next generation APIs #668 (comment))
micimize
Metadata
Metadata
Assignees
Labels
ThinkingNeeds more braining.Needs more braining.