mik-laj commented on a change in pull request #5634: [AIRFLOW-5012][WIP] Add 
typehints for gcp_*_hook.py
URL: https://github.com/apache/airflow/pull/5634#discussion_r306001021
 
 

 ##########
 File path: airflow/contrib/hooks/gcp_transfer_hook.py
 ##########
 @@ -410,15 +431,15 @@ def operations_contain_expected_statuses(operations, 
expected_statuses):
             with a state in the list,
         :rtype: bool
         """
-        expected_statuses = (
+        expected_statuses_set = (
 
 Review comment:
   Yes. Because we already have an argument that has the same name.
   ```
   airflow/contrib/hooks/gcp_transfer_hook.py:434: error: Incompatible types in 
assignment (expression has type "Set[str]", variable has type 
"Union[Tuple[str], str]")
   airflow/contrib/hooks/gcp_transfer_hook.py:442: error: Unsupported operand 
types for - ("Set[Any]" and "Tuple[str]")
   airflow/contrib/hooks/gcp_transfer_hook.py:442: error: Unsupported operand 
types for - ("Set[Any]" and "str")
   airflow/contrib/hooks/gcp_transfer_hook.py:442: note: Right operand is of 
type "Union[Tuple[str], str]"
   ```
   I do not like names of this type, but I decided that this is a small problem 
for a local variable.

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


With regards,
Apache Git Services

Reply via email to