Jc2k / aiohomekit

asyncio for homekit
Apache License 2.0
52 stars 19 forks source link

Create futures with loop.create_future() #331

Closed bdraco closed 1 year ago

bdraco commented 1 year ago

https://docs.python.org/3/library/asyncio-future.html#asyncio.Future

The rule of thumb is to never expose Future objects in user-facing APIs, and the recommended way to create a Future object is to call loop.create_future(). This way alternative event loop implementations can inject their own optimized implementations of a Future object.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f0b6db7) 67.88% compared to head (fad4185) 67.88%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #331 +/- ## ======================================= Coverage 67.88% 67.88% ======================================= Files 71 71 Lines 6775 6776 +1 ======================================= + Hits 4599 4600 +1 Misses 2176 2176 ``` | [Files Changed](https://app.codecov.io/gh/Jc2k/aiohomekit/pull/331?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [aiohomekit/controller/ip/connection.py](https://app.codecov.io/gh/Jc2k/aiohomekit/pull/331?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YWlvaG9tZWtpdC9jb250cm9sbGVyL2lwL2Nvbm5lY3Rpb24ucHk=) | `81.45% <100.00%> (+0.05%)` | :arrow_up: |

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

bdraco commented 1 year ago

Thanks. Will do a release shortly. Nothing to interesting here but would rather have a release in case there is a regression (don't except one since I've made similar changes in many other libs...but errors happen) so its easier to test later