Skip to content

Commit

Permalink
Composite Decoder: remove args & kwargs
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Inzhyyants <[email protected]>
  • Loading branch information
artem1205 committed Dec 19, 2024
1 parent eada5bf commit 1984ef1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions airbyte_cdk/sources/declarative/decoders/composite_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
class Parser(ABC):
@abstractmethod
def parse(
self, data: BufferedIOBase, *args, **kwargs
self,
data: BufferedIOBase,
) -> Generator[MutableMapping[str, Any], None, None]:
"""
Parse data and yield dictionaries.
Expand All @@ -32,7 +33,8 @@ class GzipParser(Parser):
inner_parser: Parser

def parse(
self, data: BufferedIOBase, *args, **kwargs
self,
data: BufferedIOBase,
) -> Generator[MutableMapping[str, Any], None, None]:
"""
Decompress gzipped bytes and pass decompressed data to the inner parser.
Expand All @@ -46,7 +48,8 @@ class JsonLineParser(Parser):
encoding: Optional[str] = "utf-8"

def parse(
self, data: BufferedIOBase, *args, **kwargs
self,
data: BufferedIOBase,
) -> Generator[MutableMapping[str, Any], None, None]:
for line in data:
try:
Expand All @@ -64,7 +67,8 @@ class CsvParser(Parser):
delimiter: Optional[str] = ","

def parse(
self, data: BufferedIOBase, *args, **kwargs
self,
data: BufferedIOBase,
) -> Generator[MutableMapping[str, Any], None, None]:
"""
Parse CSV data from decompressed bytes.
Expand Down

0 comments on commit 1984ef1

Please sign in to comment.