achimnol / aiotools

Idiomatic asyncio utilties
https://aiotools.readthedocs.io
MIT License
153 stars 11 forks source link

Add `closing_async()` async context manager #48

Closed achimnol closed 2 years ago

achimnol commented 2 years ago

There are still many cases that implement close() as async functions, instead of aclose(). Let's embrace such use cases with async with closing_async(...).

codecov[bot] commented 2 years ago

Codecov Report

Merging #48 (7c0e4e7) into main (3848def) will decrease coverage by 0.11%. The diff coverage is 57.14%.

@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   78.78%   78.66%   -0.12%     
==========================================
  Files          16       16              
  Lines        1329     1336       +7     
==========================================
+ Hits         1047     1051       +4     
- Misses        282      285       +3     
Impacted Files Coverage Δ
src/aiotools/context.py 92.66% <57.14%> (-2.44%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3848def...7c0e4e7. Read the comment docs.