Coverage for src/lektor_ng/version.py: 89%

9 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-09-27 11:42 +0000

1import tomllib 

2from pathlib import Path 

3 

4__version__ = "@version@" 

5__hash__ = "@sha@" 

6 

7 

8def get_version() -> str: 

9 if __version__ == "@version@": 

10 path = Path(__file__).parent.parent.parent / "pyproject.toml" 

11 return tomllib.loads(path.read_text())["project"]["version"] 

12 return __version__