Skip to content

Commit 04f132c

Browse files
committed
reduce version duplication
1 parent e1e3e54 commit 04f132c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cydifflib/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929

3030
__author__ = "Max Bachmann"
3131
__license__ = "MIT"
32-
__version__ = "1.0.1"
32+
33+
import importlib.metadata
34+
35+
try:
36+
__version__: str = importlib.metadata.version(__package__ or __name__)
37+
except importlib.metadata.PackageNotFoundError:
38+
__version__: str = "0.0.0"
3339

3440
from ._initialize import *

0 commit comments

Comments
 (0)