Skip to content

Commit e99b38c

Browse files
committed
Bump mypy in pre-commit
1 parent f507dbd commit e99b38c

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333
args: [ --fix, --exit-non-zero-on-fix ]
3434
- id: ruff-format
3535
- repo: https://github.com/pre-commit/mirrors-mypy
36-
rev: v1.14.1
36+
rev: v1.16.0
3737
hooks:
3838
- id: mypy
3939
args:

pyiceberg/expressions/literals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def __init__(self, value: bool) -> None:
262262
super().__init__(value, bool)
263263

264264
@singledispatchmethod
265-
def to(self, type_var: IcebergType) -> Literal[bool]: # type: ignore
265+
def to(self, type_var: IcebergType) -> Literal[bool]:
266266
raise TypeError(f"Cannot convert BooleanLiteral into {type_var}")
267267

268268
@to.register(BooleanType)

pyiceberg/io/fsspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191

9292

9393
def s3v4_rest_signer(properties: Properties, request: "AWSRequest", **_: Any) -> "AWSRequest":
94-
signer_url = properties.get(S3_SIGNER_URI, properties["uri"]).rstrip("/")
94+
signer_url = properties.get(S3_SIGNER_URI, properties["uri"]).rstrip("/") # type: ignore
9595
signer_endpoint = properties.get(S3_SIGNER_ENDPOINT, S3_SIGNER_ENDPOINT_DEFAULT)
9696

9797
signer_headers = {}

pyiceberg/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ def _inherit_from_manifest(entry: ManifestEntry, manifest: ManifestFile) -> Mani
763763
"""
764764
# Inherit sequence numbers.
765765
# The snapshot_id is required in V1, inherit with V2 when null
766-
if entry.snapshot_id is None:
766+
if entry.snapshot_id is None and manifest.added_snapshot_id is not None:
767767
entry.snapshot_id = manifest.added_snapshot_id
768768

769769
# in v1 tables, the sequence number is not persisted and can be safely defaulted to 0

pyiceberg/transforms.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,11 +1049,11 @@ def _truncate_number(
10491049
raise ValueError(f"Expected a numeric literal, got: {type(boundary)}")
10501050

10511051
if isinstance(pred, BoundLessThan):
1052-
return LessThanOrEqual(Reference(name), _transform_literal(transform, boundary.decrement())) # type: ignore
1052+
return LessThanOrEqual(Reference(name), _transform_literal(transform, boundary.decrement()))
10531053
elif isinstance(pred, BoundLessThanOrEqual):
10541054
return LessThanOrEqual(Reference(name), _transform_literal(transform, boundary))
10551055
elif isinstance(pred, BoundGreaterThan):
1056-
return GreaterThanOrEqual(Reference(name), _transform_literal(transform, boundary.increment())) # type: ignore
1056+
return GreaterThanOrEqual(Reference(name), _transform_literal(transform, boundary.increment()))
10571057
elif isinstance(pred, BoundGreaterThanOrEqual):
10581058
return GreaterThanOrEqual(Reference(name), _transform_literal(transform, boundary))
10591059
elif isinstance(pred, BoundEqualTo):
@@ -1073,11 +1073,11 @@ def _truncate_number_strict(
10731073
if isinstance(pred, BoundLessThan):
10741074
return LessThan(Reference(name), _transform_literal(transform, boundary))
10751075
elif isinstance(pred, BoundLessThanOrEqual):
1076-
return LessThan(Reference(name), _transform_literal(transform, boundary.increment())) # type: ignore
1076+
return LessThan(Reference(name), _transform_literal(transform, boundary.increment()))
10771077
elif isinstance(pred, BoundGreaterThan):
10781078
return GreaterThan(Reference(name), _transform_literal(transform, boundary))
10791079
elif isinstance(pred, BoundGreaterThanOrEqual):
1080-
return GreaterThan(Reference(name), _transform_literal(transform, boundary.decrement())) # type: ignore
1080+
return GreaterThan(Reference(name), _transform_literal(transform, boundary.decrement()))
10811081
elif isinstance(pred, BoundNotEqualTo):
10821082
return NotEqualTo(Reference(name), _transform_literal(transform, boundary))
10831083
elif isinstance(pred, BoundEqualTo):

0 commit comments

Comments
 (0)