From f4a83d2e199700051adda4944336921f653341bd Mon Sep 17 00:00:00 2001 From: faph Date: Mon, 18 Dec 2023 10:03:47 +0000 Subject: [PATCH] Mypy to ignore return types from fastavro readers --- src/py_adapter/plugin/_avro.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/py_adapter/plugin/_avro.py b/src/py_adapter/plugin/_avro.py index c1de3b4..1efdd52 100644 --- a/src/py_adapter/plugin/_avro.py +++ b/src/py_adapter/plugin/_avro.py @@ -85,7 +85,7 @@ def deserialize(stream: BinaryIO, py_type: Type, writer_schema: bytes, reader_sc basic_obj = fastavro.read.schemaless_reader( stream, writer_schema=writer_schema_obj, reader_schema=reader_schema_obj ) - return basic_obj + return basic_obj # type: ignore[return-value] @py_adapter.plugin.hook @@ -106,7 +106,7 @@ def deserialize_many( # TODO: make it fail if writer_schema is provided? reader_schema_obj = _parse_fastavro_schema(reader_schema) if reader_schema else None basic_objs = fastavro.read.reader(stream, reader_schema=reader_schema_obj) - return basic_objs + return basic_objs # type: ignore[return-value] def _default_schema(py_type: Type) -> bytes: