Skip to content

Commit 8bf1f5e

Browse files
Export __version__ via __all__
PEP 396 convention: ``__version__`` is the canonical module-level version handle. Advertise it in ``__all__`` so ``from sqlalchemydqlite import *`` binds it and static-analysis tools that read ``__all__`` as the source of truth see it as public. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b1e38c7 commit 8bf1f5e

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/sqlalchemydqlite/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
from sqlalchemydqlite.base import DqliteDialect
44

5-
__all__ = ["DqliteDialect"]
5+
__all__ = ["DqliteDialect", "__version__"]
66

77
__version__ = "0.1.3"

tests/test_version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ def test_pyproject_matches_package_version() -> None:
1111
with pyproject.open("rb") as f:
1212
metadata = tomllib.load(f)
1313
assert metadata["project"]["version"] == sqlalchemydqlite.__version__
14+
15+
16+
def test_version_is_in_all() -> None:
17+
"""PEP 396 convention: ``__version__`` is a public module attribute."""
18+
assert "__version__" in sqlalchemydqlite.__all__

0 commit comments

Comments
 (0)