Skip to content

Fix: Explicitly export public API in factory/__init__.py using __all__#1154

Closed
bartektrybala wants to merge 1 commit into
FactoryBoy:masterfrom
bartektrybala:add-all-to-init
Closed

Fix: Explicitly export public API in factory/__init__.py using __all__#1154
bartektrybala wants to merge 1 commit into
FactoryBoy:masterfrom
bartektrybala:add-all-to-init

Conversation

@bartektrybala

Copy link
Copy Markdown

What does this PR do?

Adds the __all__ list to factory/__init__.py.

Why is this necessary?

Currently, strict type checkers (like Pyright or mypy) and modern IDEs throw an error when importing elements like LazyFunction directly from factory (e.g., "LazyFunction" is not exported from module "factory").

Explicitly defining __all__ resolves these warnings and properly defines the public API of the module without changing any underlying functionality.

Checklist:

  • Code passes automated checks locally (tox)
  • Resolves a single issue (type checker export warnings)

@trogers8080

trogers8080 commented Jun 10, 2026

Copy link
Copy Markdown

There's actually already a PR for these changes here. It just unfortunately hasn't been merged.

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.

2 participants