feat: parse toml entrypoint

This commit is contained in:
aclist committed 2026-06-03 16:01:15 +09:00
1 parent 48cb062d90
commit 5776f4c49f
2 files changed
+17 -6

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
from pprint import pprint
import tomllib
from pathlib import Path
root = Path(__file__).resolve().parents[1]
def get_entrypoint() -> None:
p = root.joinpath("pyproject.toml")
with open(p, "rb") as f:
t = tomllib.load(f)
name = t["project"]["name"]
return t["project"]["scripts"][name]