Skip to content

Commit a5758cc

Browse files
committed
address comments
1 parent b895ae8 commit a5758cc

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

pyiceberg/typedef.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,4 @@ def __hash__(self) -> int:
208208

209209

210210
TableVersion: TypeAlias = Literal[1, 2, 3]
211+
ViewVersion: TypeAlias = Literal[1]

pyiceberg/view/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
class View:
3030
"""An Iceberg view."""
3131

32-
_identifier: Identifier = Field()
32+
_identifier: Identifier
3333
metadata: ViewMetadata
3434

3535
def __init__(

pyiceberg/view/metadata.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
from pyiceberg.schema import Schema
2424
from pyiceberg.typedef import IcebergBaseModel, Identifier, Properties
25+
from pyiceberg.typedef import ViewVersion as ViewVersionLiteral
2526
from pyiceberg.types import transform_dict_value_to_str
2627

2728

@@ -73,7 +74,7 @@ class ViewMetadata(IcebergBaseModel):
7374

7475
view_uuid: str = Field(alias="view-uuid")
7576
"""A UUID that identifies the view, generated when the view is created."""
76-
format_version: int = Field(alias="format-version", ge=1, le=1)
77+
format_version: ViewVersionLiteral = Field(alias="format-version", ge=1, le=1)
7778
"""An integer version number for the view format; must be 1"""
7879
location: str = Field()
7980
"""The view's base location; used to create metadata file locations"""

0 commit comments

Comments
 (0)