FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: import Command and Application from where they live by melbinjp · Pull Request #539 · python-poetry/cleo · GitHub

docs: import Command and Application from where they live - #539

Open
melbinjp wants to merge 2 commits into
python-poetry:mainfrom
melbinjp:docs/import-paths
Open

docs: import Command and Application from where they live#539
melbinjp wants to merge 2 commits into
python-poetry:mainfrom
melbinjp:docs/import-paths

Conversation

melbinjp commented Aug 17, 2026
edited
Loading

Copy link
Copy Markdown

src/cleo/__init__.py defines only __version__ and exports nothing, so every documented example fails on its first line:

>>> from cleo import Command
ImportError: cannot import name 'Command' from 'cleo'

That includes the first code block in the introduction, the one a new user copies before anything else works.

Six occurrences, three documents

file line was
docs/introduction.rst 9 from cleo import Command
docs/introduction.rst 43, 409, 433 from cleo import Application
docs/single_command_tool.rst 10 from cleo import Application
docs/usage.rst 17 from cleo import Application

Corrected to the paths the project's own tests use

from cleo.commands.command import Command
from cleo.application import Application

Both were executed against this tree before pushing: the old import raises, the new ones resolve.

Found with docproof, which checks documentation claims against the code. It flagged cleo.Command as not defined, imported, or re-exported anywhere in cleo; the other five turned up when I went looking for the same shape.

`src/cleo/__init__.py` defines only `__version__`, so every documented example fails
on its first line:

    >>> from cleo import Command
    ImportError: cannot import name 'Command' from 'cleo'

Six occurrences across three documents, including the first code block in the
introduction - the one a new user copies before anything else.

Corrected to the paths the project's own tests use:

    from cleo.commands.command import Command
    from cleo.application import Application

Both verified to import against this tree.
dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL