Skip to content

Commit c7264e0

Browse files
committed
Fixed missing __version__ attribute
`__name__` would resolve to "simple_history", which is the name of the module, but not the package. Replaced it with "django-simple-history", which is also what's done in `docs/conf.py`.
1 parent 5439c00 commit c7264e0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

simple_history/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from importlib import metadata
22

3-
try:
4-
__version__ = metadata.version(__name__)
5-
except metadata.PackageNotFoundError:
6-
# package is not installed
7-
pass
3+
__version__ = metadata.version("django-simple-history")
84

95

106
def register(

0 commit comments

Comments
 (0)