Skip to content

Commit

Permalink
Fix typo in deprecation version (2.0.0 -> 5.0.0) from #190
Browse files Browse the repository at this point in the history
Resolve PEP warnings
  • Loading branch information
NeonDaniel committed Apr 23, 2024
1 parent 9d4443b commit e8ac1a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion neon_speech/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def run(module, package, force_install):
@click.option("--force-install", "-f", default=False, is_flag=True,
help="Force pip installation of configured module")
def install_plugin(module, package, force_install):
log_deprecation("`install-plugin` replaced by `install-dependencies`", "2.0.0")
log_deprecation("`install-plugin` replaced by `install-dependencies`", "5.0.0")
from neon_speech.utils import install_stt_plugin
from ovos_config.config import Configuration
speech_config = Configuration()
Expand All @@ -102,6 +102,7 @@ def install_plugin(module, package, force_install):
if not module:
click.echo("Plugin specified without module")


@neon_speech_cli.command(help="Install neon-speech module dependencies from config & cli")
@click.option("--package", "-p", default=[], multiple=True,
help="Additional package to install (can be repeated)")
Expand All @@ -114,6 +115,7 @@ def install_dependencies(package: List[str]):
LOG.info(f"pip exit code: {result}")
sys.exit(result)


@neon_speech_cli.command(help="Install a STT Plugin")
@click.option("--plugin", "-p", default=None,
help="STT module to init")
Expand Down
4 changes: 3 additions & 1 deletion neon_speech/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ def _plugin_to_package(plugin: str) -> str:
}
return known_plugins.get(plugin) or plugin


def build_extra_dependency_list(config: Union[dict, Configuration], additional: List[str] = []) -> List[str]:
extra_dependencies = config.get("extra_dependencies", {})
dependencies = additional + extra_dependencies.get("global", []) + extra_dependencies.get("voice", [])

return dependencies

@deprecated("Replaced by `neon_utils.packaging_utils.install_packages_from_pip`", "2.0.0")

@deprecated("Replaced by `neon_utils.packaging_utils.install_packages_from_pip`", "5.0.0")
def install_stt_plugin(plugin: str) -> bool:
"""
Install an stt plugin using pip
Expand Down

0 comments on commit e8ac1a2

Please sign in to comment.