From 62f352f58b3dbfed643fdf203b4fa6a1de90d1d4 Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Thu, 16 Jan 2025 15:37:01 -0800 Subject: [PATCH] docs: Add docstrings for Identifier, Properties, RecursiveDict This allows mkdocstrings to generate hyperlinks to these types in the documentation. Fixes: #1529 --- pyiceberg/typedef.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyiceberg/typedef.py b/pyiceberg/typedef.py index 01b8bea58c..b2c3f8af20 100644 --- a/pyiceberg/typedef.py +++ b/pyiceberg/typedef.py @@ -74,8 +74,23 @@ def __missing__(self, key: K) -> V: Identifier = Tuple[str, ...] +"""A tuple of strings representing a table identifier. + +Each string in the tuple represents a part of the table's unique path. For example, +a table in a namespace might be identified as: + + ("namespace", "table_name") + +Examples: + >>> identifier: Identifier = ("namespace", "table_name") +""" + Properties = Dict[str, Any] +"""A dictionary type for properties in PyIceberg.""" + + RecursiveDict = Dict[str, Union[str, "RecursiveDict"]] +"""A recursive dictionary type for nested structures in PyIceberg.""" # Represents the literal value L = TypeVar("L", str, bool, int, float, bytes, UUID, Decimal, covariant=True)