diff --git a/instructor/cli/deprecated_hub.py b/instructor/cli/deprecated_hub.py index 451570be9..38ffdb775 100644 --- a/instructor/cli/deprecated_hub.py +++ b/instructor/cli/deprecated_hub.py @@ -1,10 +1,8 @@ -from typing import Any -import typer -from typer import Typer, Exit, echo +from typer import Exit, echo, Typer -app: Typer = typer.Typer() +app: Typer = Typer(help="Instructor Hub CLI (Deprecated)") -@app.command() +@app.command(name="hub") def hub() -> None: """ This command has been deprecated. The instructor hub is no longer available. diff --git a/tests/llm/test_openai/docs/test_hub.py b/tests/llm/test_openai/docs/test_hub.py index 34f97eb51..bc203566f 100644 --- a/tests/llm/test_openai/docs/test_hub.py +++ b/tests/llm/test_openai/docs/test_hub.py @@ -1,11 +1,10 @@ import pytest -from pytest_examples import find_examples, CodeExample, EvalExample - +from pytest_examples import CodeExample, EvalExample @pytest.mark.skip(reason="Hub functionality is being removed") -def test_format_blog(example: CodeExample, eval_example: EvalExample): +def test_format_blog(example: CodeExample, eval_example: EvalExample) -> None: """This test is being skipped as the hub functionality is being removed.""" - excluded_sources = [ + excluded_sources: list[str] = [ "mistral", "ollama", "llama_cpp", diff --git a/tests/test_deprecated_hub.py b/tests/test_deprecated_hub.py index 8e651a8a6..8c8624aa1 100644 --- a/tests/test_deprecated_hub.py +++ b/tests/test_deprecated_hub.py @@ -1,13 +1,12 @@ -from typing import Any +from typing import Any, cast from typer.testing import CliRunner, Result from instructor.cli.deprecated_hub import app -from typer import Typer runner: CliRunner = CliRunner() def test_deprecated_hub_command() -> None: """Test that the hub command returns a deprecation message and exits with code 1""" - result: Result[Any] = runner.invoke(app) + result = cast(Result[Any], runner.invoke(app)) assert result.exit_code == 1 assert "instructor hub has been deprecated" in result.stdout assert "https://python.useinstructor.com/examples/" in result.stdout