Skip to content

Commit 77a7288

Browse files
ruff: simplify version retrieval logic in __init__.py
1 parent 136aa5c commit 77a7288

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/pygambit/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,4 @@
3636
# Package is not installed, fallback to reading GAMBIT_VERSION file
3737
import pathlib
3838
_version_file = pathlib.Path(__file__).parent.parent.parent / "GAMBIT_VERSION"
39-
if _version_file.exists():
40-
__version__ = _version_file.read_text().strip()
41-
else:
42-
__version__ = "unknown"
39+
__version__ = _version_file.read_text().strip() if _version_file.exists() else "unknown"

0 commit comments

Comments
 (0)