Bluetooth-Devices / dbus-fast

A faster version of dbus-next
MIT License
35 stars 8 forks source link

feat: make ErrorType enums compare as strings #269

Closed agners closed 9 months ago

agners commented 9 months ago

The DBusError exception stores the error type as string. This makes the exception not directly compare to the ErrorType members (for example DBusError(ErrorType.FAILED, "").type != ErrorType.FAILED). This makes ErrorType also a string to make this comparision work.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (1586221) 83.34% compared to head (2a23330) 83.28%. Report is 3 commits behind head on main.

Files Patch % Lines
src/dbus_fast/__version__.py 0.00% 1 Missing :warning:
src/dbus_fast/service.py 50.00% 0 Missing and 1 partial :warning:
src/dbus_fast/signature.py 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #269 +/- ## ========================================== - Coverage 83.34% 83.28% -0.06% ========================================== Files 28 28 Lines 3290 3291 +1 Branches 682 682 ========================================== - Hits 2742 2741 -1 - Misses 331 335 +4 + Partials 217 215 -2 ```

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

bdraco commented 9 months ago

I put this on my production Bluetooth env, and tested with bleak. I didn't see anything in the logs or unexpected side effects.

The tests look good so feel free to merge if you are ready