VisaInstrument replace kwargs with metadata
VisaInstrument used to take kwargs but actually the only non explicit argument is metadata so we might as well write that out.
Codecov Report
Merging #4445 (b5dd89c) into master (b5dd89c) will not change coverage. The diff coverage is
n/a.
:exclamation: Current head b5dd89c differs from pull request most recent head e28905d. Consider uploading reports for the commit e28905d to get more accurate results
@@ Coverage Diff @@
## master #4445 +/- ##
=======================================
Coverage 68.05% 68.05%
=======================================
Files 290 290
Lines 31314 31314
=======================================
Hits 21312 21312
Misses 10002 10002
I dont think so. Instrument did not take and more kwargs so that would just throw. I guess it could throw in multiple inheritance?
I guess it could throw in multiple inheritance?
oh, that's even a better catch. need to write a test to check....
@astafan8 I mean the following will certainly break.
class Foo
def __init__(fooness=None, **kwargs):
self._fooness = fooness
super().__init__(**kwargs)
class Bar(VisaInstrument, Foo)
def __init__(name, **kwargs)
super().__init__(name, **kwargs)
bar = Bar(name="bar", address="someaddr", fooness="max")
so if we care about that we should not make the change
so if we care about that we should not make the change
i do hope that we don't care :) we could try to release with this change and revert it if someone reports a breakage. or reserve this change for the v1.0 times :)
@astafan8 We could also be more defensive and add metadata as a keyword argument and trigger a warning if len(kwargs) > 0
We could also be more defensive and add metadata as a keyword argument and trigger a warning if len(kwargs) > 0
ah! great idea, i support this :)