aio-libs / aiodocker

Python Docker API client based on asyncio and aiohttp
Other
427 stars 97 forks source link

Improve type annotations in core functions #850

Closed achimnol closed 2 months ago

achimnol commented 3 months ago

refs #847

[!NOTE]

861 has introduced explicit cancellation of utils._AsyncCM, but this PR removes it completely and replaces it with the intrinsic async context managers which provides better exception handling as "originally" expected.

Checklist

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 84.89209% with 21 lines in your changes missing coverage. Please review.

Project coverage is 81.14%. Comparing base (7b3d86f) to head (d6ccbe0).

Files Patch % Lines
aiodocker/logs.py 11.11% 8 Missing :warning:
aiodocker/docker.py 69.56% 4 Missing and 3 partials :warning:
aiodocker/containers.py 85.00% 1 Missing and 5 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #850 +/- ## ========================================== - Coverage 81.25% 81.14% -0.12% ========================================== Files 24 24 Lines 1382 1421 +39 Branches 245 253 +8 ========================================== + Hits 1123 1153 +30 - Misses 173 175 +2 - Partials 86 93 +7 ```

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

achimnol commented 2 months ago

Currently the Windows test in CI seems to be broken in an unexpected way. In my local Windows box (standard Docker Desktop + Python 3.12.4 from chocolatey), it works well with a minor glitch:

image image