From e98c56144c66b64aff3e24621c4245a228738935 Mon Sep 17 00:00:00 2001 From: constanca Date: Wed, 29 May 2024 15:25:21 +0200 Subject: [PATCH] fix lint errors Signed-off-by: constanca --- share/config.py | 1 + tests/handlers/aws/test_utils.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/share/config.py b/share/config.py index 2a305ee6..f9ce3fe2 100644 --- a/share/config.py +++ b/share/config.py @@ -443,6 +443,7 @@ def add_output(self, output_type: str, **kwargs: Any) -> None: # for the same url/cloud_id for both types logstash or elasticsearch raise ValueError(f"Duplicated output destination {output_dest} for type {output_type}") + output: Optional[Output] = None if output_type == "elasticsearch": output = ElasticsearchOutput(**kwargs) elif output_type == "logstash": diff --git a/tests/handlers/aws/test_utils.py b/tests/handlers/aws/test_utils.py index 1c4d704d..19c57918 100644 --- a/tests/handlers/aws/test_utils.py +++ b/tests/handlers/aws/test_utils.py @@ -239,7 +239,7 @@ def test_get_shipper_from_input(self) -> None: assert isinstance(shipper._shippers[0], LogstashShipper) with self.subTest("Logstash shipper from each input"): - config_yaml_cw: str = """ + config_yaml_cw = """ inputs: - type: cloudwatch-logs id: arn:aws:logs:eu-central-1:123456789:stream/test-cw-logs @@ -273,7 +273,7 @@ def test_get_shipper_from_input(self) -> None: event_input_kinesis.delete_output_by_destination("logstash_url") with self.subTest("Two Logstash shippers from Cloudwatch logs input"): - config_yaml_cw: str = """ + config_yaml_cw = """ inputs: - type: cloudwatch-logs id: arn:aws:logs:eu-central-1:123456789:stream/test-cw-logs @@ -296,7 +296,7 @@ def test_get_shipper_from_input(self) -> None: event_input.delete_output_by_destination("logstash_url-2") with self.subTest("Two outputs with the same logstash_url"): - config_yaml_cw: str = """ + config_yaml_cw = """ inputs: - type: cloudwatch-logs id: arn:aws:logs:eu-central-1:123456789:stream/test-cw-logs