Skip to content

Remove the ASYNC230 per-file ignore in voice.py #5

Description

@alimaandev

Problem

pyproject.toml ignores ASYNC230 (blocking calls inside async functions) for shortube/voice.py. The async _generate_with_timestamps path performs blocking file I/O, which blocks the event loop and is a latent bug for any future async caller.

Task

Rewrite the async path so no blocking calls run inside the coroutine (or drop async entirely and use a plain function run in a worker). Remove the per-file ignore and the comment in pyproject.toml.

Acceptance criteria

  • python -m ruff check shortube tests is clean with the per-file ignore removed
  • tests/test_voice.py passes unchanged (keep the public generate_voiceover API)
  • Voiceover output is byte-identical for the same inputs (regression-safe)

Files

  • shortube/voice.py
  • pyproject.toml
  • tests/test_voice.py

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt — needs a focused refactor

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions