Skip to content

Commit

Permalink
ability to override unicode decode errors
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbelden committed Jul 6, 2023
1 parent 89e35b7 commit 5fb84c5
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 197 deletions.
10 changes: 8 additions & 2 deletions fastavro/_read.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class file_reader(Generic[T]):
self,
fo_or_decoder: Union[IO, AvroJSONDecoder],
reader_schema: Optional[Schema] = ...,
return_record_name: bool = ...,
options: Dict = ...,
): ...
def __iter__(self) -> Iterator[T]: ...
def __next__(self) -> T: ...
Expand All @@ -38,6 +38,8 @@ class reader(file_reader[AvroMessage]):
fo: Union[IO, AvroJSONDecoder],
reader_schema: Optional[Schema] = ...,
return_record_name: bool = ...,
return_record_name_override: bool = ...,
handle_unicode_errors: str = ...,
): ...

class block_reader(file_reader[Block]):
Expand All @@ -46,6 +48,8 @@ class block_reader(file_reader[Block]):
fo: IO,
reader_schema: Optional[Schema] = ...,
return_record_name: bool = ...,
return_record_name_override: bool = ...,
handle_unicode_errors: str = ...,
): ...

class Block:
Expand All @@ -63,7 +67,7 @@ class Block:
writer_schema: Dict,
offset: int,
size: int,
return_record_name: bool,
options: Dict,
): ...
def __iter__(self) -> Iterator[AvroMessage]: ...
def __str__(self) -> str: ...
Expand All @@ -73,6 +77,8 @@ def schemaless_reader(
writer_schema: Schema,
reader_schema: Optional[Schema],
return_record_name: bool = ...,
return_record_name_override: bool = ...,
handle_unicode_errors: str = ...,
) -> AvroMessage: ...
def is_avro(path_or_buffer: Union[str, IO]) -> bool: ...

Expand Down

0 comments on commit 5fb84c5

Please sign in to comment.