Skip to content

fix: suppress SyntaxWarning in _voice_processing by moving return out… - #25518

Closed
wyf9661 wants to merge 1 commit into
NousResearch:mainfrom
wyf9661:main
Closed

fix: suppress SyntaxWarning in _voice_processing by moving return out…#25518
wyf9661 wants to merge 1 commit into
NousResearch:mainfrom
wyf9661:main

Conversation

@wyf9661

@wyf9661 wyf9661 commented May 14, 2026

Copy link
Copy Markdown

What does this PR do?

The return statement at the end of the no-speech-count check was nested inside the
finally: block, which silently suppresses exceptions from the except clause.

Moved the no-speech tracking logic (lines 9686–9702) outside of finally:
so cleanup still runs via the finally: block but return executes after it,
restoring normal exception semantics. No functional change.

Related Issue

Fixes #

Type of Change

  • [✅] 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

How to Test

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

…side finally block

The return
    statement at the end of the no-speech-count check was nested inside the
    finally: block, which silently suppresses exceptions from the except clause.

    Moved the no-speech tracking logic (lines 9686–9702) outside of finally:
    so cleanup still runs via the finally: block but return executes after it,
    restoring normal exception semantics. No functional change.
@alt-glitch alt-glitch added type/bug Something isn't working duplicate This issue or pull request already exists comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels May 14, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #21100 (which implements #21088). Same fix: move return out of finally block in _voice_stop_and_transcribe to suppress Python 3.14+ SyntaxWarning. Also duplicates #21261, #23654, #23709.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants