Skip to content

Remove unreachable code after while true#842

Merged
odudex merged 1 commit intoselfcustody:developfrom
tadeubas:remove-unreachable-code
Apr 6, 2026
Merged

Remove unreachable code after while true#842
odudex merged 1 commit intoselfcustody:developfrom
tadeubas:remove-unreachable-code

Conversation

@tadeubas
Copy link
Copy Markdown
Member

@tadeubas tadeubas commented Mar 25, 2026

What is this PR for?

Remove unreachable code after while true, as pointed out by vulture with 100% confidence.

Changes made to:

  • Code
  • Tests
  • Docs
  • CHANGELOG

Did you build the code and tested on device?

  • Yes, build and tested on

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Docs update
  • Other

@tadeubas tadeubas force-pushed the remove-unreachable-code branch from c9cae16 to 1ee38dc Compare March 25, 2026 02:44
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.31%. Comparing base (94760c5) to head (a9bf6c0).
⚠️ Report is 7 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #842   +/-   ##
========================================
  Coverage    97.31%   97.31%           
========================================
  Files           83       83           
  Lines        10573    10573           
========================================
  Hits         10289    10289           
  Misses         284      284           

☔ 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.

@tadeubas tadeubas force-pushed the remove-unreachable-code branch from 1ee38dc to a9bf6c0 Compare March 25, 2026 02:53
@tadeubas
Copy link
Copy Markdown
Member Author

Forced-push to fix PR with just one removal. Opened an issue on vulture for the false positive: jendrikseipp/vulture#413

while True:
data = kef_envelope.unseal_ui()
if data is None:
# fail if not unsealed
Copy link
Copy Markdown
Collaborator

@jdlcdl jdlcdl Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be more clear to future readers to break here and still raise ValueError(err) at bottom so that it doesn't look like falling off end of function is possible?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was think it was a good idea, but than called AI for help, plz check the response: https://chatgpt.com/share/69c3e205-b8fc-83e9-b278-7894b33fb241

@odudex odudex merged commit 0237152 into selfcustody:develop Apr 6, 2026
7 checks passed
@odudex
Copy link
Copy Markdown
Member

odudex commented Apr 6, 2026

Thank you!

@odudex odudex mentioned this pull request Apr 22, 2026
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.

3 participants