Skip to content

refactor: add explicit __all__ exports across all package __init__.py files - #2

Merged
berrytern merged 1 commit into
developfrom
refactor/init-exports-all
Aug 11, 2026
Merged

refactor: add explicit __all__ exports across all package __init__.py files#2
berrytern merged 1 commit into
developfrom
refactor/init-exports-all

Conversation

@berrytern

Copy link
Copy Markdown
Member

Summary of Changes

This PR refactors all __init__.py files across the library to follow PEP 8 and Python API design best practices.

Key Enhancements

  1. Explicit __all__ Exports: Added __all__ definitions to all 6 __init__.py files (amqp_client_python, rabbitmq, domain/models, domain/utils, event, and exceptions).
  2. Clean Public API Surface: Prevents unintended re-exports, cleans up IDE autocompletion, and improves static type checking compatibility (mypy/ pyright).
  3. Removed Duplicate Re-exports: Cleaned up indirect re-export of ConnectionType from rabbitmq/__init__.py.

Verifications

  • Flake8: 0 errors
  • Tests: All 46 unit tests and 16 integration tests pass successfully.

… files

- Add __all__ to root __init__.py and all submodules (rabbitmq, domain/models, domain/utils, event, exceptions)
- Remove duplicate ConnectionType re-export from rabbitmq/__init__.py
- Ensure strict type checking and clean public API export surface
@berrytern
berrytern merged commit 79b4d5c into develop Aug 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant