zigpy icon indicating copy to clipboard operation
zigpy copied to clipboard

Clean up listeners and increase API ergonomics

Open puddly opened this issue 1 year ago • 1 comments

I think it would be easiest to add another method for listening to a specific listener event. The current approach of passing an object and having the object listen to all events is a little nonstandard.

I've also added kwarg support. Not sure if this is the best way forward, as it maybe would be better to ensure we can only pass around dataclass event objects like zigpy/zha currently does.

puddly avatar Apr 01 '24 19:04 puddly

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.49%. Comparing base (24d3a00) to head (6407e07).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1374   +/-   ##
=======================================
  Coverage   99.49%   99.49%           
=======================================
  Files          55       55           
  Lines       10367    10373    +6     
=======================================
+ Hits        10315    10321    +6     
  Misses         52       52           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 02 '24 05:04 codecov[bot]