fix: clean up omnivoice import guard and __init__ error masking

Remove OmniVoice = None fallback in nodes/loader.py so missing omnivoice
gives a clear ImportError instead of a confusing AttributeError. Restore
__init__.py to clean form without the try/except that silently swallowed
real import errors. Add omnivoice mock to conftest.py and register a
pytest plugin that prevents pytest from treating the project root as a
Package node (which would try to import __init__.py outside a package
context and fail on the relative import).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
EthanfelandClaude Sonnet 4.6 committed 2026-04-05 09:03:34 +02:00
1 parent 069169485d
commit 11beba1c47
4 files changed
+41 -19

No files matched your search

+1 -4
View File
@@ -1,10 +1,7 @@
import os
import torch
try:
from omnivoice import OmniVoice
except ImportError:
OmniVoice = None # type: ignore[assignment,misc]
from omnivoice import OmniVoice
try:
import folder_paths