kazanzhy commented on a change in pull request #20319:
URL: https://github.com/apache/airflow/pull/20319#discussion_r770074731



##########
File path: airflow/providers/qubole/operators/qubole_check.py
##########
@@ -27,21 +27,26 @@
 class _QuboleCheckOperatorMixin:
     """This is a Mixin for Qubole related check operators"""
 
+    kwargs: dict
+    results_parser_callable: Optional[Callable]
+
     def execute(self, context=None) -> None:
         """Execute a check operation against Qubole"""
         try:
             self._hook_context = context
-            super().execute(context=context)
+            super().execute(context=context)  # type: ignore[misc]

Review comment:
       Nice solution :)
   It is very similar to using Protocol but without protocol. 
   Unfortunately, it doesn't work for me.
   In this case, `BaseOperator` hasn't method `get_hook` as well as none of the 
`super` classes have `execute` method. 
   
   I think might be cases where some class inherits from mixin and two other 
classes and these classes have such different attributes and can't be reduced 
to one. But it will be another story.
   Thanks for the suggestion

##########
File path: airflow/providers/qubole/operators/qubole_check.py
##########
@@ -27,21 +27,26 @@
 class _QuboleCheckOperatorMixin:
     """This is a Mixin for Qubole related check operators"""
 
+    kwargs: dict
+    results_parser_callable: Optional[Callable]
+
     def execute(self, context=None) -> None:
         """Execute a check operation against Qubole"""
         try:
             self._hook_context = context
-            super().execute(context=context)
+            super().execute(context=context)  # type: ignore[misc]

Review comment:
       Nice solution :)
   It is very similar to using Protocol but without protocol. Unfortunately, it 
doesn't work for me.
   In this case, `BaseOperator` hasn't method `get_hook` as well as none of the 
`super` classes have `execute` method. 
   
   I think might be cases where some class inherits from mixin and two other 
classes and these classes have such different attributes and can't be reduced 
to one. But it will be another story.
   Thanks for the suggestion




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