We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f61af9 commit 65d71c6Copy full SHA for 65d71c6
src/lean_spec/types/list.py
@@ -9,7 +9,7 @@ class LeanList:
9
"""A generic type for creating length-limited lists."""
10
11
@classmethod
12
- def __class_getitem__(cls, params: tuple[Any, ...]):
13
- """Make the class subscriptable (e.g., List[str, 10])."""
+ def __class_getitem__(cls, params: tuple[Any, ...]) -> Any:
+ """Make the class subscriptable (e.g., LeanList[str, 10])."""
14
item_type, max_length = params
15
return Annotated[list[item_type], Field(max_length=max_length)]
0 commit comments