From 8016f53bfc7a2c09b663da0a8c813496728caae0 Mon Sep 17 00:00:00 2001 From: antoine-b-smartway Date: Wed, 17 Apr 2024 11:57:35 +0200 Subject: [PATCH] int-699 Code review feedbacks --- magicparse/schema.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/magicparse/schema.py b/magicparse/schema.py index b836ea0..348dc55 100644 --- a/magicparse/schema.py +++ b/magicparse/schema.py @@ -49,15 +49,15 @@ def parse(self, data: Union[bytes, BytesIO]) -> Tuple[List[dict], List[dict]]: items = [] errors = [] - for item, rowErrors in self.stream_parse(data): - if(rowErrors): - errors.extend(rowErrors) + for item, row_errors in self.stream_parse(data): + if(row_errors): + errors.extend(row_errors) else: items.append(item) return items, errors - def stream_parse(self, data: Union[bytes, BytesIO]) -> Iterable[Tuple[dict, dict]]: + def stream_parse(self, data: Union[bytes, BytesIO]) -> Iterable[Tuple[dict, list[dict]]]: if isinstance(data, bytes): stream = BytesIO(data) else: