rmartin16 / qbittorrent-api

Python client implementation for qBittorrent's Web API
https://qbittorrent-api.readthedocs.io/
MIT License
398 stars 66 forks source link

refactor: make mypy happy about `Torrent.is_paused` #457

Closed trim21 closed 3 months ago

trim21 commented 3 months ago

mypy doesn't think is_paused is a property so it raise a warning

error: Function "is_paused" could always be true in boolean context [truthy-function]

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 100.00%. Comparing base (404281e) to head (99ba259). Report is 29 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #457 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 15 15 Lines 1929 1935 +6 Branches 373 376 +3 ========================================= + Hits 1929 1935 +6 ```

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

rmartin16 commented 3 months ago

That's unfortunate; this seems to be the upstream issue documenting this behavior in mypy.

Given how often this library is aliasing things, I'd be surprised if this is the only case. I'll see if I can proactively find others.