Skip to content

Commit

Permalink
relative import for version and use PackageNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
Saransh-cpp committed Sep 18, 2024
1 parent ee90d3a commit 901c622
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions glass/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from importlib.metadata import PackageNotFoundError

try:
from glass._version import __version__, __version_tuple__
except ModuleNotFoundError:
from ._version import __version__, __version_tuple__
except PackageNotFoundError:
pass

from glass.fields import (
Expand Down

0 comments on commit 901c622

Please sign in to comment.