From 77a93fc8f3be40e90fb7ba9a6e6124da78a790f7 Mon Sep 17 00:00:00 2001 From: alkatar21 <61387986+alkatar21@users.noreply.github.com> Date: Fri, 7 Oct 2022 10:54:47 +0200 Subject: [PATCH] Add `__all__` --- CHANGELOG.md | 5 +++++ codetiming/__init__.py | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4593405..a9e2f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Added + +- `__all__` to let type checkers know what is part of the public API. (by [@alkatar21](https://github.com/alkatar21) in [#46]) + ## [1.3.1] - 2022-10-06 ### Added @@ -73,3 +77,4 @@ Initial version of `codetiming`. Version 1.0.0 corresponds to the code in the tu [#34]: https://github.com/realpython/codetiming/pull/34 [#35]: https://github.com/realpython/codetiming/pull/35 [#38]: https://github.com/realpython/codetiming/pull/38 +[#46]: https://github.com/realpython/codetiming/pull/46 diff --git a/codetiming/__init__.py b/codetiming/__init__.py index 18d0a26..7d95024 100644 --- a/codetiming/__init__.py +++ b/codetiming/__init__.py @@ -22,7 +22,10 @@ def stuff(): """ # Codetiming imports -from codetiming._timer import Timer, TimerError # noqa +from codetiming._timer import Timer, TimerError + +# Use __all__ to let type checkers know what is part of the public API. +__all__ = ["Timer", "TimerError"] # Versioning is handled by bump2version __version__ = "1.3.1"