fix(build): keep the TUI sidecar hook importable on hatchling 1.32.1 (#1325)

hatchling 1.32.1 made BuildHookInterface a two-parameter generic, so
subscripting it with one argument raises TypeError when the hook module
is imported and every from-source build fails. Subclass the unsubscripted
interface, which works on both the old and new generic signatures.
This commit is contained in:
alex s
2026-09-16 14:25:38 -04:00
committed by GitHub
parent 65d495bb7f
commit 910c1ea4bb

View File

@@ -12,7 +12,7 @@ from typing import Any
from hatchling.builders.hooks.plugin.interface import BuildHookInterface from hatchling.builders.hooks.plugin.interface import BuildHookInterface
class CustomBuildHook(BuildHookInterface[Any]): class CustomBuildHook(BuildHookInterface): # type: ignore[type-arg]
"""Compile the Bubble Tea sidecar and ship it inside the wheel. """Compile the Bubble Tea sidecar and ship it inside the wheel.
The sidecar is the only interactive interface, so every wheel is a The sidecar is the only interactive interface, so every wheel is a