Skip to content

fix: use if-statement with raise instead of assert on 'pydub/silence.py' - #876

Open
rxxbyy wants to merge 1 commit into
jiaaro:masterfrom
rxxbyy:fix/replace-assert-with-valueerror-in-detect-leading-silence
Open

fix: use if-statement with raise instead of assert on 'pydub/silence.py'#876
rxxbyy wants to merge 1 commit into
jiaaro:masterfrom
rxxbyy:fix/replace-assert-with-valueerror-in-detect-leading-silence

Conversation

@rxxbyy

@rxxbyy rxxbyy commented Apr 8, 2026

Copy link
Copy Markdown

assert can be disabled on a environment with optimizations enabled which cause assert statements to emit no code causing the infinite loop guard to be silently ignored. (https://docs.python.org/3/reference/simple_stmts.html#index-18)

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