turbaszek commented on a change in pull request #8805:
URL: https://github.com/apache/airflow/pull/8805#discussion_r437473652



##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -297,7 +297,7 @@ class SerializedBaseOperator(BaseOperator, 
BaseSerialization):
     _decorated_fields = {'executor_config'}
 
     _CONSTRUCTOR_PARAMS = {
-        k: v.default for k, v in signature(BaseOperator).parameters.items()
+        k: v.default for k, v in 
signature(BaseOperator.__init__).parameters.items()

Review comment:
       Because:
   ```python
   In [3]: class meta(type):
      ...:     def __call__(cls, *args, **kwargs):
      ...:         return type.__call__(cls, *args, **kwargs)
      ...:
   
   In [7]: class Klass(metaclass=meta):
      ...:     def __init__(self, a, b, c):
      ...:         pass
      ...:
   
   In [8]: signature(Klass).parameters
   Out[8]: mappingproxy({'args': <Parameter "*args">, 'kwargs': <Parameter 
"**kwargs">})
   
   In [9]: signature(Klass.__init__).parameters
   Out[9]:
   mappingproxy({'self': <Parameter "self">,
                 'a': <Parameter "a">,
                 'b': <Parameter "b">,
                 'c': <Parameter "c">})




----------------------------------------------------------------
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.

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


Reply via email to