Skip to content

Commit adf9d3d

Browse files
committed
Composite Raw Decoder: fix mypy
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
1 parent 5276ed1 commit adf9d3d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

airbyte_cdk/sources/declarative/decoders/composite_decoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ def is_stream_response(self) -> bool:
101101
def decode(
102102
self, response: requests.Response
103103
) -> Generator[MutableMapping[str, Any], None, None]:
104-
yield from self.parser.parse(data=response.raw)
104+
yield from self.parser.parse(data=response.raw) # type: ignore[arg-type]

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,9 +1709,11 @@ def create_gzipjson_decoder(
17091709
) -> GzipJsonDecoder:
17101710
return GzipJsonDecoder(parameters={}, encoding=model.encoding)
17111711

1712-
@staticmethod
1713-
def create_gzip_parser(model: GzipParserModel, config: Config, **kwargs: Any) -> GzipParser:
1714-
return GzipParser(inner_parser=model.inner_parser)
1712+
def create_gzip_parser(
1713+
self, model: GzipParserModel, config: Config, **kwargs: Any
1714+
) -> GzipParser:
1715+
inner_parser = self._create_component_from_model(model=model.inner_parser, config=config)
1716+
return GzipParser(inner_parser=inner_parser)
17151717

17161718
@staticmethod
17171719
def create_csv_parser(model: CsvParserModel, config: Config, **kwargs: Any) -> CsvParser:

0 commit comments

Comments
 (0)