Open OCopping opened 6 months ago
If you two are happy with the decorator approach to try and clean up the functions inside Connection objects, I might try and move them into a separate script to then be imported. I would have to make them more generalised though (e.g. instead of looking at self._reader
and self,_writer
in _ensure_connected
, I could set a new self._connected
variable in the object that could be used in every new Connection object too)
I have tested similar decorators in pythonSoftIOC
s I have written recently and they worked nicely.
Codecov Report
Attention: Patch coverage is
50.00000%
with20 lines
in your changes missing coverage. Please review.Additional details and impacted files
```diff @@ Coverage Diff @@ ## main #26 +/- ## ========================================== + Coverage 43.96% 45.03% +1.06% ========================================== Files 18 18 Lines 655 675 +20 ========================================== + Hits 288 304 +16 - Misses 367 371 +4 ```:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.