refactor(gooddata-sdk): migrate @attr.s to @define#1380
Merged
hkad98 merged 1 commit intogooddata:masterfrom Mar 2, 2026
Merged
refactor(gooddata-sdk): migrate @attr.s to @define#1380hkad98 merged 1 commit intogooddata:masterfrom
hkad98 merged 1 commit intogooddata:masterfrom
Conversation
… models Unify attrs usage to the modern `@define` API (recommended since attrs 20.1.0). This eliminates three co-existing styles (@attr.s, @attrs.define, @define with redundant auto_attribs) in favor of a single consistent pattern: bare `@define` with `from attrs import define, field, ...`. Key changes across 82 files: - @attr.s / @attr.s(auto_attribs=True) → @define - @attr.s(auto_attribs=True, kw_only=True) → @define(kw_only=True) - @attrs.define(...) → @define(...) - Dropped redundant auto_attribs=True from existing @define calls - attr.field/Factory/asdict/Attribute → field/Factory/asdict/Attribute - import attr / import attrs → from attrs import define, ... - from attr.setters → from attrs.setters Enables slots=True by default (@define's default), which is safe here: no dynamic attribute assignment, max 2-level inheritance, cattrs-compatible. JIRA: trivial risk: low
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1380 +/- ##
===========================================
+ Coverage 0.00% 77.55% +77.55%
===========================================
Files 158 224 +66
Lines 11048 14432 +3384
===========================================
+ Hits 0 11193 +11193
+ Misses 11048 3239 -7809 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
no23reason
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gooddata-sdkto the modern@defineAPI, eliminating three co-existing styles (@attr.s,@attrs.define,@definewith redundantauto_attribs)from attrs import define, field, ...with@defineauto_attribs=Trueparameters and normalizeattr.field/Factory/asdictto bare imports