Skip to content

Commit cfe4a4e

Browse files
committed
fix lint errors
1 parent 23e2cb2 commit cfe4a4e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

pyiceberg/catalog/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,9 +853,10 @@ def _create_staged_table(
853853
Returns:
854854
StagedTable: the created staged table instance.
855855
"""
856-
schema: Schema = self._convert_schema_if_needed(
857-
schema, int(properties.get(TableProperties.FORMAT_VERSION, TableProperties.DEFAULT_FORMAT_VERSION))
858-
) # type: ignore
856+
schema: Schema = self._convert_schema_if_needed( # type: ignore
857+
schema,
858+
int(properties.get(TableProperties.FORMAT_VERSION, TableProperties.DEFAULT_FORMAT_VERSION)), # type: ignore
859+
)
859860

860861
database_name, table_name = self.identifier_to_database_and_table(identifier)
861862

pyiceberg/catalog/rest/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ def _create_table(
500500
stage_create: bool = False,
501501
) -> TableResponse:
502502
iceberg_schema = self._convert_schema_if_needed(
503-
schema, int(properties.get(TableProperties.FORMAT_VERSION, TableProperties.DEFAULT_FORMAT_VERSION))
503+
schema,
504+
int(properties.get(TableProperties.FORMAT_VERSION, TableProperties.DEFAULT_FORMAT_VERSION)), # type: ignore
504505
)
505506
fresh_schema = assign_fresh_schema_ids(iceberg_schema)
506507
fresh_partition_spec = assign_fresh_partition_spec_ids(partition_spec, iceberg_schema, fresh_schema)

pyiceberg/table/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class TableProperties:
219219

220220
DEFAULT_NAME_MAPPING = "schema.name-mapping.default"
221221
FORMAT_VERSION = "format-version"
222-
DEFAULT_FORMAT_VERSION = 2
222+
DEFAULT_FORMAT_VERSION: TableVersion = 2
223223

224224
MANIFEST_TARGET_SIZE_BYTES = "commit.manifest.target-size-bytes"
225225
MANIFEST_TARGET_SIZE_BYTES_DEFAULT = 8 * 1024 * 1024 # 8 MB

0 commit comments

Comments
 (0)