Skip to content

Commit

Permalink
Fix __version__ import
Browse files Browse the repository at this point in the history
- Use standard try-except
  • Loading branch information
HCookie committed Oct 25, 2024
1 parent 1ec2d7e commit 098140f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/anemoi/inference/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@
# nor does it submit to any jurisdiction.


from ._version import __version__ as __version__
try:
# NOTE: the `_version.py` file must not be present in the git repository
# as it is generated by setuptools at install time
from ._version import __version__ # type: ignore
except ImportError: # pragma: no cover
# Local copy or not installed with setuptools
__version__ = "999"

0 comments on commit 098140f

Please sign in to comment.