Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57 +/- ##
==========================================
- Coverage 84.06% 83.94% -0.13%
==========================================
Files 4 4
Lines 295 299 +4
==========================================
+ Hits 248 251 +3
- Misses 47 48 +1 ☔ View full report in Codecov by Sentry. |
|
|
implement pyright review comments
|
|
||
| async def put(self, _: "EigerController", attr: AttrW, value: Any) -> None: | ||
| async def put(self, controller: BaseController, attr: AttrW, value: Any) -> None: | ||
| assert isinstance(attr, AttrR) # AttrW does not implement set |
There was a problem hiding this comment.
Why is this necessary if attr is AttrW?
There was a problem hiding this comment.
AttrW doesn't have set so pyright complains if we're trying to call set if we don't verify it's an AttrR (or I guess AttrRW).
| if isinstance(value, list) and all( | ||
| isinstance(s, str) for s in value | ||
| ): # error is a list of strings | ||
| value = ", ".join(value) |
There was a problem hiding this comment.
Formatting it like this might make it look like two messages is actually one, so it is probably clearer to just do str(value) Or maybe use a different separator, like |?
I do wonder if this should be implemented in FastCS with String().validate(value).
There was a problem hiding this comment.
I have a feeling that in a previous release lists did automatically get cast to strings, though I may be misremembering and that was just in a dev branch I never pushed anywhere.
Closing #50