Problem
base_cli.testing is exported as a module in base_cli.__all__, making it a documented public interface. However, testing.py itself has no __all__ definition.
The module contains:
invoke() — public test helper, intended for consumer use
_RunAppInvocation — internal class (underscore prefix marks it private)
Without __all__, the internal _RunAppInvocation class is implicitly part of the module's public surface for any tool that enumerates module members (e.g., dir(base_cli.testing), pydoc, mkdocs auto-documentation). The underscore prefix suppresses from base_cli.testing import * correctly, but it does not prevent IDE discovery or documentation generation from showing the internal class.
Fix
Add to testing.py:
This makes the intended public surface explicit and consistent with the rest of the package, where every module that is in base_cli.__all__ has its own __all__ (confirmed: history.py, command_protocol.py, command_filters.py, json_contracts.py, extensions.py, config.py, context.py, typer.py all have __all__).
Verification
After the fix, base_cli.testing.__all__ should equal ["invoke"]. The contract test in test_public_api.py should be updated to cover base_cli.testing.__all__ as well.
Problem
base_cli.testingis exported as a module inbase_cli.__all__, making it a documented public interface. However,testing.pyitself has no__all__definition.The module contains:
invoke()— public test helper, intended for consumer use_RunAppInvocation— internal class (underscore prefix marks it private)Without
__all__, the internal_RunAppInvocationclass is implicitly part of the module's public surface for any tool that enumerates module members (e.g.,dir(base_cli.testing),pydoc,mkdocsauto-documentation). The underscore prefix suppressesfrom base_cli.testing import *correctly, but it does not prevent IDE discovery or documentation generation from showing the internal class.Fix
Add to
testing.py:This makes the intended public surface explicit and consistent with the rest of the package, where every module that is in
base_cli.__all__has its own__all__(confirmed:history.py,command_protocol.py,command_filters.py,json_contracts.py,extensions.py,config.py,context.py,typer.pyall have__all__).Verification
After the fix,
base_cli.testing.__all__should equal["invoke"]. The contract test intest_public_api.pyshould be updated to coverbase_cli.testing.__all__as well.