-
-
Notifications
You must be signed in to change notification settings - Fork 302
Update attrs
brain to exclude ClassVar
annotated attributes
#2811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2811 +/- ##
==========================================
+ Coverage 93.31% 93.35% +0.03%
==========================================
Files 91 91
Lines 11094 11100 +6
==========================================
+ Hits 10352 10362 +10
+ Misses 742 738 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
d5421ed
to
a768ecd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thanks!
Sorry I forgot about this, but could you add a Changelog entry?
a768ecd
to
a11d343
Compare
Type of Changes
Description
This is related to pylint #10525. When a class is decorated with
attrs.define
, attributes are treated as instance variables, unless they are explicitly annotated withtyping.ClassVar
. However, theattrs
brain transforms all class attributes into instance attributes, including those withClassVar
type annotation.This update fixes that behavior by ensuring that attributes annotated with
ClassVar
are skipped during the transformation.