common-workflow-language / cwltool

Common Workflow Language reference implementation
https://cwltool.readthedocs.io/
Apache License 2.0
324 stars 225 forks source link

Replace .decode method with str(bytes, "utf-8") #1998

Closed tetron closed 2 months ago

tetron commented 2 months ago

This is because some bytes-like objects (such as memoryview) don't have a "decode()" method. It appears that the preferred way to get a decoded string is to simply call the constructor with the bytes-like object and the desired encoding.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 83.83%. Comparing base (22fc2c2) to head (7702c4f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1998 +/- ## ======================================= Coverage 83.83% 83.83% ======================================= Files 46 46 Lines 8245 8245 Branches 2190 2190 ======================================= Hits 6912 6912 - Misses 856 857 +1 + Partials 477 476 -1 ```

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

tetron commented 2 months ago

I guess what it is telling me is that because I added tests, but the tests are not exhaustive of all lines/branches of the newly tested functions, the % total coverage actually went down. Argh.