uranusjr commented on code in PR #35465:
URL: https://github.com/apache/airflow/pull/35465#discussion_r1382729073


##########
tests/providers/amazon/aws/hooks/test_hooks_signature.py:
##########
@@ -187,10 +187,10 @@ def method2(self, spam: str):
     if not hooks:
         pytest.skip(reason=f"Module {hook_module!r} doesn't contain subclasses 
of `AwsGenericHook`.")
 
-    errors = []
+    errors: list[str] = []
     for hook, hook_name in hooks:
         is_valid, msg = validate_hook(hook, hook_name, hook_module)
-        if not is_valid:
+        if not is_valid and msg:
             errors.append(msg)

Review Comment:
   ```suggestion
       validation_results = (validate_hook(hook, hook_name, hook_module) for 
hook, hook_name in hooks)
       errors = [
           message
           for valid, message in validation_results
           if not valid and message
       ]
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to