From e4154ed4a24f7045e7e825c63bf9dadbdb94a957 Mon Sep 17 00:00:00 2001 From: tianzedavid <168427849+tianzedavid@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:43:55 +0800 Subject: [PATCH] chore: fix some comments (#3900) --- dashboard/pages/overview.py | 4 ++-- docs/developer-guide/unit-testing.md | 2 +- prowler/providers/aws/lib/service/service.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dashboard/pages/overview.py b/dashboard/pages/overview.py index 7d2b3054e5..e9b8aa8d7f 100644 --- a/dashboard/pages/overview.py +++ b/dashboard/pages/overview.py @@ -222,7 +222,7 @@ else: # Handle the case where there is location column if "LOCATION" in data.columns: data["REGION"] = data["LOCATION"] - # Hande the case where there is no region column + # Handle the case where there is no region column if "REGION" not in data.columns: data["REGION"] = "-" # Handle the case where the region is null @@ -685,7 +685,7 @@ def filter_data( ######################################################## """Line PLOT 1""" ######################################################## - # Formating date columns + # Formatting date columns filtered_data_sp["TIMESTAMP_formatted"] = pd.to_datetime( filtered_data_sp["TIMESTAMP"] ).dt.strftime("%Y-%m-%d") diff --git a/docs/developer-guide/unit-testing.md b/docs/developer-guide/unit-testing.md index 6cce90fd3b..ce551e0752 100644 --- a/docs/developer-guide/unit-testing.md +++ b/docs/developer-guide/unit-testing.md @@ -410,7 +410,7 @@ Then, at the check_level when Python tries to import the client with `from prowl ### Services -For testing the AWS services we have to follow the same logic as with the AWS checks, we have to check if the AWS API calls made by the service are covered by Moto and we have to test the service `__init__` to verifiy that the information is being correctly retrieved. +For testing the AWS services we have to follow the same logic as with the AWS checks, we have to check if the AWS API calls made by the service are covered by Moto and we have to test the service `__init__` to verify that the information is being correctly retrieved. The service tests could act as *Integration Tests* since we test how the service retrieves the information from the provider, but since Moto or the custom mock objects mocks that calls this test will fall into *Unit Tests*. diff --git a/prowler/providers/aws/lib/service/service.py b/prowler/providers/aws/lib/service/service.py index 384056805a..ccb517fdc1 100644 --- a/prowler/providers/aws/lib/service/service.py +++ b/prowler/providers/aws/lib/service/service.py @@ -15,7 +15,7 @@ MAX_WORKERS = 10 class AWSService: """The AWSService class offers a parent class for each AWS Service to generate: - AWS Regional Clients - - Shared information like the account ID and ARN, the the AWS partition and the checks audited + - Shared information like the account ID and ARN, the AWS partition and the checks audited - AWS Session - Thread pool for the __threading_call__ - Also handles if the AWS Service is Global