Skip to content

Commit

Permalink
fix: add version to globals
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Sep 7, 2024
1 parent 6bcee5d commit 2378da2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/timeout_executor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def __getattr__(name: str) -> Any: # pragma: no cover
from importlib.metadata import version

if name == "__version__":
return version("timeout-executor")
_version = version("timeout-executor")
globals()["__version__"] = _version
return _version

error_msg = f"The attribute named {name!r} is undefined."
raise AttributeError(error_msg)

0 comments on commit 2378da2

Please sign in to comment.