From ce10189e18bd24b7b875bb27132b246d1e6fdc5e Mon Sep 17 00:00:00 2001 From: mkranna Date: Mon, 20 Feb 2023 20:03:44 +0000 Subject: [PATCH] Fixes in tox.ini --- .../{{cookiecutter.library_name}}/sinks.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/cookiecutter/target-template/{{cookiecutter.target_id}}/{{cookiecutter.library_name}}/sinks.py b/cookiecutter/target-template/{{cookiecutter.target_id}}/{{cookiecutter.library_name}}/sinks.py index 938395b76..b8bc3bd2d 100644 --- a/cookiecutter/target-template/{{cookiecutter.target_id}}/{{cookiecutter.library_name}}/sinks.py +++ b/cookiecutter/target-template/{{cookiecutter.target_id}}/{{cookiecutter.library_name}}/sinks.py @@ -47,7 +47,12 @@ class {{ cookiecutter.destination_name }}Sink({{ sinkclass }}): {% if sinkclass == "RecordSink" -%} def process_record(self, record: dict, context: dict) -> None: - """Process the record.""" + """Process the record. + + Args: + record: Individual record in the stream. + context: Stream partition or context dictionary. + """ # Sample: # ------ # client.write(record) @@ -61,6 +66,9 @@ def start_batch(self, context: dict) -> None: Developers may optionally add additional markers to the `context` dict, which is unique to this batch. + + Args: + context: Stream partition or context dictionary. """ # Sample: # ------ @@ -72,6 +80,10 @@ def process_record(self, record: dict, context: dict) -> None: Developers may optionally read or write additional markers within the passed `context` dict from the current batch. + + Args: + record: Individual record in the stream. + context: Stream partition or context dictionary. """ # Sample: # ------ @@ -79,7 +91,11 @@ def process_record(self, record: dict, context: dict) -> None: # csvfile.write(record) def process_batch(self, context: dict) -> None: - """Write out any prepped records and return once fully written.""" + """Write out any prepped records and return once fully written. + + Args: + context: Stream partition or context dictionary. + """ # Sample: # ------ # client.upload(context["file_path"]) # Upload file