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

potiuk 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 34e8b6fd21 Fix signature check into the `test_expected_thin_hooks` 
test (#37218)
34e8b6fd21 is described below

commit 34e8b6fd21e6f6e3e3962e5eda37ee186d1e7958
Author: Andrey Anshin <[email protected]>
AuthorDate: Wed Feb 7 18:57:07 2024 +0400

    Fix signature check into the `test_expected_thin_hooks` test (#37218)
---
 tests/providers/amazon/aws/hooks/test_hooks_signature.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/providers/amazon/aws/hooks/test_hooks_signature.py 
b/tests/providers/amazon/aws/hooks/test_hooks_signature.py
index 34a1d011fa..a6530f45a6 100644
--- a/tests/providers/amazon/aws/hooks/test_hooks_signature.py
+++ b/tests/providers/amazon/aws/hooks/test_hooks_signature.py
@@ -72,7 +72,7 @@ def get_aws_hooks_modules():
     elif not hooks_dir.is_dir():
         raise NotADirectoryError(hooks_dir.__fspath__())
 
-    for module in hooks_dir.glob("*.py"):
+    for module in sorted(hooks_dir.glob("*.py")):
         name = module.stem
         if name.startswith("_"):
             continue
@@ -99,7 +99,7 @@ def get_aws_hooks_from_module(hook_module: str) -> 
list[tuple[type[AwsGenericHoo
 
 def validate_hook(hook: type[AwsGenericHook], hook_name: str, hook_module: 
str) -> tuple[bool, str | None]:
     hook_extra_parameters = set()
-    for k, v in inspect.signature(hook).parameters.items():
+    for k, v in inspect.signature(hook.__init__).parameters.items():
         if v.kind == inspect.Parameter.VAR_POSITIONAL:
             k = "*args"
         elif v.kind == inspect.Parameter.VAR_KEYWORD:

Reply via email to