Skip to content

Commit

Permalink
docs: Add docstrings for Identifier, Properties, RecursiveDict
Browse files Browse the repository at this point in the history
This allows mkdocstrings to generate hyperlinks
to these types in the documentation.

Fixes: #1529
  • Loading branch information
rodrigc committed Jan 17, 2025
1 parent 59a0b37 commit 62f352f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pyiceberg/typedef.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 62f352f

Please sign in to comment.