Skip to content

Commit e51c0e9

Browse files
committed
Fix mypy unused-ignore in the upgrade integration test
1 parent 3dbf39f commit e51c0e9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tests/integration/test_reads.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import uuid
2222
from datetime import datetime, timedelta
2323
from pathlib import PosixPath
24-
from typing import Any
24+
from typing import Any, cast
2525
from urllib.parse import urlparse
2626

2727
import pyarrow as pa
@@ -52,6 +52,7 @@
5252
from pyiceberg.schema import Schema
5353
from pyiceberg.table import Table
5454
from pyiceberg.table.snapshots import Operation
55+
from pyiceberg.typedef import TableVersion
5556
from pyiceberg.types import (
5657
BinaryType,
5758
BooleanType,
@@ -984,7 +985,7 @@ def test_upgrade_table_version(catalog: Catalog) -> None:
984985

985986
with pytest.raises(ValueError) as e:
986987
with table_test_table_version.transaction() as transaction:
987-
transaction.upgrade_table_version(format_version=4) # type: ignore[arg-type]
988+
transaction.upgrade_table_version(format_version=cast(TableVersion, 4))
988989
assert "Unsupported table format version: 4" in str(e.value)
989990

990991

0 commit comments

Comments
 (0)