Skip to content

Commit ee7990e

Browse files
committed
fix: add comments
1 parent acc36f8 commit ee7990e

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
project = 'khisto-python'
2121
copyright = '2026, The Khiops Team'
2222
author = 'The Khiops Team'
23+
# We want to make sure the docs are built on an installed package only
2324
release = importlib.metadata.version("khisto")
2425

2526
# -- General configuration ---------------------------------------------------

src/khisto/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
KHISTO_BIN_DIR = os.environ.get("KHISTO_BIN_DIR", "khisto")
1515

1616
if (ROOT_DIR / "pyproject.toml").exists():
17+
# Development mode: package not installed; pyproject.toml present
1718
# TODO : Remove on Python 3.10 EOL
1819
try:
1920
import tomllib as tomli
@@ -23,6 +24,7 @@
2324
with open(ROOT_DIR / "pyproject.toml", "rt") as f:
2425
__version__ = tomli.load(f)["project"]["version"]
2526
else:
27+
# User mode: package installed; pyproject.toml not directly accessible
2628
from importlib.metadata import version # noqa: E402
2729

2830
__version__ = version("khisto")

0 commit comments

Comments
 (0)