Skip to content

Comments

Remove request isinstance Exception checks from switch#677

Merged
TheJulianJES merged 1 commit intozigpy:devfrom
TheJulianJES:tjj/remove_dead_exception_code
Feb 25, 2026
Merged

Remove request isinstance Exception checks from switch#677
TheJulianJES merged 1 commit intozigpy:devfrom
TheJulianJES:tjj/remove_dead_exception_code

Conversation

@TheJulianJES
Copy link
Contributor

This removes two dead isinstance check in the switch platform. Zigpy cannot return an exception as the result here. It'll always raise instead.

Another PR will remove all Status.SUCCESS checks for the result. We'll have to be slightly more careful with that change because ZCL errors like UNSUPP_CLUSTER_COMMAND don't raise(?) But they should also never occur, really.

Related discussion in:

@TheJulianJES
Copy link
Contributor Author

Unlike #678, it is safe to just remove these two isinstance checks.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.51%. Comparing base (1b6b19f) to head (d729016).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #677   +/-   ##
=======================================
  Coverage   97.51%   97.51%           
=======================================
  Files          62       62           
  Lines       10941    10941           
=======================================
  Hits        10669    10669           
  Misses        272      272           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheJulianJES TheJulianJES merged commit c5a3171 into zigpy:dev Feb 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant