-
Notifications
You must be signed in to change notification settings - Fork 11
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
DM-41049: Allow derived types in ConfigDictField items #107
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
+ Coverage 85.37% 85.38% +0.01%
==========================================
Files 46 46
Lines 3631 3634 +3
==========================================
+ Hits 3100 3103 +3
Misses 531 531 ☔ View full report in Codecov by Sentry. |
@@ -76,7 +76,7 @@ def __setitem__(self, k, x, at=None, label="setitem", setHistory=True): | |||
if x == dtype: | |||
self._dict[k] = dtype(__name=name, __at=at, __label=label) | |||
else: | |||
self._dict[k] = dtype(__name=name, __at=at, __label=label, **x._storage) | |||
self._dict[k] = x.__class__(__name=name, __at=at, __label=label, **x._storage) |
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.
Why did you use __class__
here instead of type
?
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.
I can't remember having a good reason so I changed it to type
.
2495b1f
to
a2cdc06
Compare
a2cdc06
to
ac50554
Compare
@natelust and @TallJimbo convinced me that supporting derived types in Config*Field would be too disruptive of a change, so I'm moving the useful parts from this ticket (updated tests, error messages, etc) to DM-43415. |
Checklist
doc/changes