Skip to content

Commit

Permalink
Mypy to ignore return types from fastavro readers
Browse files Browse the repository at this point in the history
  • Loading branch information
faph committed Dec 18, 2023
1 parent 328ed8c commit f4a83d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/py_adapter/plugin/_avro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit f4a83d2

Please sign in to comment.