From 414b45c681302b61f771bc8971609a6faff59bd9 Mon Sep 17 00:00:00 2001 From: say Date: Sun, 24 May 2026 02:46:18 -0700 Subject: [PATCH 1/2] docs: use correct import paths in examples --- docs/introduction.rst | 8 ++++---- docs/single_command_tool.rst | 2 +- docs/usage.rst | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/introduction.rst b/docs/introduction.rst index f53ea12f..4f6a921f 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -6,7 +6,7 @@ create ``greet_command.py`` and add the following to it: .. code-block:: python - from cleo import Command + from cleo.commands.command import Command class GreetCommand(Command): @@ -40,7 +40,7 @@ an ``Application`` and adds commands to it: #!/usr/bin/env python from greet_command import GreetCommand - from cleo import Application + from cleo.application import Application application = Application() application.add(GreetCommand()) @@ -406,7 +406,7 @@ console: import pytest - from cleo import Application + from cleo.application import Application from cleo.testers.command_tester import CommandTester def test_execute(self): @@ -430,7 +430,7 @@ as a string to the ``CommandTester.execute()`` method: import pytest - from cleo import Application + from cleo.application import Application from cleo.testers.command_tester import CommandTester def test_execute(self): diff --git a/docs/single_command_tool.rst b/docs/single_command_tool.rst index c7d8509a..6ee029b8 100644 --- a/docs/single_command_tool.rst +++ b/docs/single_command_tool.rst @@ -7,7 +7,7 @@ it is possible to remove this need by using `default()` when adding a command: .. code-block:: python - from cleo import Application + from cleo.application import Application command = GreetCommand() diff --git a/docs/usage.rst b/docs/usage.rst index 6c441017..5ed9fcba 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -14,7 +14,7 @@ built-in options as well as a couple of built-in commands for Cleo. #!/usr/bin/env python # application.py - from cleo import Application + from cleo.application import Application application = Application() # ... From 25768c8dda70a53025aee671b421f4aff4c7dd18 Mon Sep 17 00:00:00 2001 From: say Date: Sun, 24 May 2026 02:47:53 -0700 Subject: [PATCH 2/2] docs: add news fragment --- news/531.docs.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/531.docs.md diff --git a/news/531.docs.md b/news/531.docs.md new file mode 100644 index 00000000..8241df74 --- /dev/null +++ b/news/531.docs.md @@ -0,0 +1 @@ +Fixed import paths in documentation examples to match the public API.