Skip to content

Commit 82ff343

Browse files
committed
fix: return corrent version when package is built
1 parent c182858 commit 82ff343

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dataframe_expectations/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
"""DataFrame Expectations - A validation library for pandas and PySpark DataFrames."""
22

3-
from importlib.metadata import version
3+
try:
4+
from importlib.metadata import version
45

5-
__version__ = version("dataframe-expectations")
6+
__version__ = version("dataframe-expectations")
7+
except Exception:
8+
# Package is not installed (e.g., during development or linting)
9+
# Catch all exceptions to handle various edge cases in different environments
10+
__version__ = "0.0.0.dev0"
611

712
__all__ = []

0 commit comments

Comments
 (0)