Bug Report
Several parameters use bare type annotations with None as default value (e.g., int = None, str = None), which is incorrect. These should use Optional[T] = None to properly indicate nullable types per PEP 484.
Affected locations
-
src/voxcpm/modules/minicpm4/config.py (line 29):
kv_channels: int = None → kv_channels: Optional[int] = None
-
src/voxcpm/modules/locdit/local_dit.py (line 30):
out_dim: int = None → out_dim: Optional[int] = None
-
src/voxcpm/core.py (lines 109, 183–185):
cache_dir: str = None → cache_dir: Optional[str] = None
prompt_wav_path: str = None → prompt_wav_path: Optional[str] = None
prompt_text: str = None → prompt_text: Optional[str] = None
reference_wav_path: str = None → reference_wav_path: Optional[str] = None
Expected behavior
All parameters that default to None should be annotated with Optional[T] for correct type checking.
Bug Report
Several parameters use bare type annotations with
Noneas default value (e.g.,int = None,str = None), which is incorrect. These should useOptional[T] = Noneto properly indicate nullable types per PEP 484.Affected locations
src/voxcpm/modules/minicpm4/config.py (line 29):
kv_channels: int = None→kv_channels: Optional[int] = Nonesrc/voxcpm/modules/locdit/local_dit.py (line 30):
out_dim: int = None→out_dim: Optional[int] = Nonesrc/voxcpm/core.py (lines 109, 183–185):
cache_dir: str = None→cache_dir: Optional[str] = Noneprompt_wav_path: str = None→prompt_wav_path: Optional[str] = Noneprompt_text: str = None→prompt_text: Optional[str] = Nonereference_wav_path: str = None→reference_wav_path: Optional[str] = NoneExpected behavior
All parameters that default to
Noneshould be annotated withOptional[T]for correct type checking.