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

8 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-09-05 15:22 +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 return tomllib.loads(Path("pyproject.toml").read_text())["project"]["version"] 

11 return __version__