jaimeferj commented on code in PR #2561:
URL: https://github.com/apache/iceberg-python/pull/2561#discussion_r2443408796
##########
pyiceberg/transforms.py:
##########
@@ -120,7 +120,7 @@ def _try_import(module_name: str, extras_name:
Optional[str] = None) -> types.Mo
raise NotInstalledError(msg) from None
-def _transform_literal(func: Callable[[L], L], lit: Literal[L]) -> Literal[L]:
+def _transform_literal(func: Callable[[Any], Any], lit: Literal[L]) ->
Literal[L]:
Review Comment:
In order to silence this mypy errors:
```
- hook id: mypy
- exit code: 1
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[str | None], str | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[bool | None], bool | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[int | None], int | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[float | None], float | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[bytes | None], bytes | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[UUID | None], UUID | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[Decimal | None], Decimal | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[datetime | None], datetime | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[date | None], date | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1049: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[time | None], time | None]"; expected
"Callable[[str], str]" [arg-type]
pyiceberg/transforms.py:1051: error: Argument 1 to "_transform_literal"
has incompatible type "Callable[[str | None], str | None]"; expected
"Callable[[str], str]" [arg-type]```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]