Closed cheeseandcereal closed 3 months ago
Attention: Patch coverage is 0%
with 8 lines
in your changes missing coverage. Please review.
Project coverage is 77.67%. Comparing base (
57c064f
) to head (8950f10
). Report is 40 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
transmission_rpc/torrent.py | 0.00% | 6 Missing :warning: |
transmission_rpc/client.py | 0.00% | 1 Missing :warning: |
transmission_rpc/session.py | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Fixes #456
This PR fixes 'double' number type parsing, by ensuring that all values documented/intended as 'doubles' in the transmission RPC are returned as 'float's by this library (as they're already currently correctly documented).
This fixes the issue of unintentionally returning 'int' types for these functions which document 'float' return types when the return value is a whole number (particularly
0
or1
). Some functions in the library already did this, but not all of them, so this PR fixes this inconsistency.See the upstream transmission documentation for all parameters which are a 'double' value type which should be returned as 'float's by this library: https://github.com/transmission/transmission/blob/main/docs/rpc-spec.md
Testing
I ran all tests (
task lint
andtask test
[note, an__init__.py
file needed to be added to thetests/
directory fortask test
to work]) as well as did a basic sanity check against live usage of this package after these changes.Before these changes:
After these changes: