This is an automated email from the ASF dual-hosted git repository.

vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new dc08e6acc2 D105 Check on Amazon (#37764)
dc08e6acc2 is described below

commit dc08e6acc2def50c88c7a2425c300a61338f0b0a
Author: Satoshi S <[email protected]>
AuthorDate: Wed Feb 28 09:35:51 2024 -0600

    D105 Check on Amazon (#37764)
---
 airflow/providers/amazon/aws/exceptions.py               | 2 ++
 airflow/providers/amazon/aws/executors/ecs/utils.py      | 2 ++
 airflow/providers/amazon/aws/hooks/ecr.py                | 1 +
 airflow/providers/amazon/aws/utils/connection_wrapper.py | 2 ++
 docs/spelling_wordlist.txt                               | 1 +
 pyproject.toml                                           | 4 ----
 6 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/airflow/providers/amazon/aws/exceptions.py 
b/airflow/providers/amazon/aws/exceptions.py
index 89755d91f2..fa0afb1d72 100644
--- a/airflow/providers/amazon/aws/exceptions.py
+++ b/airflow/providers/amazon/aws/exceptions.py
@@ -31,6 +31,7 @@ class EcsTaskFailToStart(Exception):
         super().__init__(message)
 
     def __reduce__(self):
+        """Return ECSTask state and its message."""
         return EcsTaskFailToStart, (self.message)
 
 
@@ -43,6 +44,7 @@ class EcsOperatorError(Exception):
         super().__init__(message)
 
     def __reduce__(self):
+        """Return EcsOperator state and a tuple of failures list and 
message."""
         return EcsOperatorError, (self.failures, self.message)
 
 
diff --git a/airflow/providers/amazon/aws/executors/ecs/utils.py 
b/airflow/providers/amazon/aws/executors/ecs/utils.py
index e52e3f3507..24a4b1d927 100644
--- a/airflow/providers/amazon/aws/executors/ecs/utils.py
+++ b/airflow/providers/amazon/aws/executors/ecs/utils.py
@@ -75,6 +75,7 @@ class BaseConfigKeys:
     """Base Implementation of the Config Keys class. Implements iteration for 
child classes to inherit."""
 
     def __iter__(self):
+        """Return an iterator of values of non dunder attributes of Config 
Keys."""
         return iter({value for (key, value) in self.__class__.__dict__.items() 
if not key.startswith("__")})
 
 
@@ -151,6 +152,7 @@ class EcsExecutorTask:
         return State.SUCCESS if all_containers_succeeded else State.FAILED
 
     def __repr__(self):
+        """Return a string representation of the ECS task."""
         return f"({self.task_arn}, {self.last_status}->{self.desired_status}, 
{self.get_task_state()})"
 
 
diff --git a/airflow/providers/amazon/aws/hooks/ecr.py 
b/airflow/providers/amazon/aws/hooks/ecr.py
index 7ee725a16e..e3b9874a40 100644
--- a/airflow/providers/amazon/aws/hooks/ecr.py
+++ b/airflow/providers/amazon/aws/hooks/ecr.py
@@ -41,6 +41,7 @@ class EcrCredentials:
     expires_at: datetime
 
     def __post_init__(self):
+        """Initialize the `Ecr` credentials object."""
         mask_secret(self.password)
         logger.debug("Credentials to Amazon ECR %r expires at %s.", 
self.proxy_endpoint, self.expires_at)
 
diff --git a/airflow/providers/amazon/aws/utils/connection_wrapper.py 
b/airflow/providers/amazon/aws/utils/connection_wrapper.py
index c26318130b..c23a4e8660 100644
--- a/airflow/providers/amazon/aws/utils/connection_wrapper.py
+++ b/airflow/providers/amazon/aws/utils/connection_wrapper.py
@@ -167,6 +167,7 @@ class AwsConnectionWrapper(LoggingMixin):
         return service_config.get("endpoint_url", global_endpoint_url)
 
     def __post_init__(self, conn: Connection | AwsConnectionWrapper | 
_ConnectionMetadata | None) -> None:
+        """Initialize the AwsConnectionWrapper object after instantiation."""
         if isinstance(conn, type(self)):
             # For every field with init=False we copy reference value from 
original wrapper
             # For every field with init=True we use init values if it not 
equal default
@@ -346,6 +347,7 @@ class AwsConnectionWrapper(LoggingMixin):
         )
 
     def __bool__(self):
+        """Return the truth value of the AwsConnectionWrapper instance."""
         return self.conn_id is not NOTSET
 
     def _get_credentials(
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index 65896d7f5b..dcf709f4c5 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -524,6 +524,7 @@ dttm
 dtypes
 du
 duckdb
+dunder
 durations
 dylib
 Dynamodb
diff --git a/pyproject.toml b/pyproject.toml
index 9857c71066..7b16035071 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1440,10 +1440,6 @@ combine-as-imports = true
 "airflow/utils/trigger_rule.py" = ["D105"]
 "airflow/utils/types.py" = ["D105"]
 "airflow/utils/weight_rule.py" = ["D105"]
-"airflow/providers/amazon/aws/exceptions.py" = ["D105"]
-"airflow/providers/amazon/aws/executors/ecs/utils.py" = ["D105"]
-"airflow/providers/amazon/aws/hooks/ecr.py" = ["D105"]
-"airflow/providers/amazon/aws/utils/connection_wrapper.py" = ["D105"]
 "airflow/providers/apache/hive/hooks/hive.py" = ["D105"]
 "airflow/providers/cncf/kubernetes/secret.py" = ["D105"]
 "airflow/providers/cncf/kubernetes/utils/delete_from.py" = ["D105"]

Reply via email to