You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/05 18:34:03 UTC
[GitHub] [iceberg] Fokko commented on pull request #5171: Python: Reenable mypy
Fokko commented on PR #5171:
URL: https://github.com/apache/iceberg/pull/5171#issuecomment-1175369571
@kbendick the signature was suggested by mypy:
```python
python/tests/conftest.py:833: error: Incompatible return value type (got "BufferedWriter", expected "OutputStream")
python/tests/conftest.py:833: note: Following member(s) of "BufferedWriter" have conflicts:
python/tests/conftest.py:833: note: Expected:
python/tests/conftest.py:833: note: def write(self, b: bytes) -> None
python/tests/conftest.py:833: note: Got:
python/tests/conftest.py:833: note: def write(self, Union[bytes, Union[bytearray, memoryview, array[Any], mmap, _CData, PickleBuffer]]) -> int
```
Turns out a less akward signature is also okay, the issue was in returning a `None` instead of an `int`.
@rdblue I've removed the `.closed` property, and I both had the update the `seek()` and `read()` signature by returning an `int` instead of a `None`.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org