kaxil commented on a change in pull request #11359:
URL: https://github.com/apache/airflow/pull/11359#discussion_r501991061



##########
File path: airflow/providers/microsoft/azure/log/wasb_task_handler.py
##########
@@ -17,11 +17,13 @@
 # under the License.
 import os
 import shutil
+from typing import Optional, Tuple, Dict
 
 from azure.common import AzureHttpError
 from cached_property import cached_property
 
 from airflow.configuration import conf
+from airflow.models import TaskInstance

Review comment:
       This will create cyclic import i.e. this module will call itself in a 
loop, causing errors

##########
File path: airflow/providers/microsoft/azure/log/wasb_task_handler.py
##########
@@ -17,11 +17,13 @@
 # under the License.
 import os
 import shutil
+from typing import Optional, Tuple, Dict
 
 from azure.common import AzureHttpError
 from cached_property import cached_property
 
 from airflow.configuration import conf
+from airflow.models import TaskInstance

Review comment:
       mainly because this is a log handler. I think that is what @mik-laj means

##########
File path: 
airflow/providers/microsoft/azure/operators/azure_container_instances.py
##########
@@ -136,16 +136,16 @@ def __init__(
         name: str,
         image: str,
         region: str,
-        environment_variables: Optional[Dict[Any, Any]] = None,
+        environment_variables: Optional[dict] = None,
         secured_variables: Optional[str] = None,
-        volumes: Optional[List[Any]] = None,
+        volumes: Optional[list] = None,
         memory_in_gb: Optional[Any] = None,
         cpu: Optional[Any] = None,
         gpu: Optional[Any] = None,
         command: Optional[str] = None,
         remove_on_error: bool = True,
         fail_if_exists: bool = True,
-        tags: Optional[Dict[str, str]] = None,
+        tags: Optional[dict] = None,

Review comment:
       ```suggestion
           tags: Optional[Dict[str, str]] = None,
   ```
   
   isn't `Dict[str, str] more appropriate here?

##########
File path: 
airflow/providers/microsoft/azure/operators/azure_container_instances.py
##########
@@ -136,16 +136,16 @@ def __init__(
         name: str,
         image: str,
         region: str,
-        environment_variables: Optional[Dict[Any, Any]] = None,
+        environment_variables: Optional[dict] = None,
         secured_variables: Optional[str] = None,
-        volumes: Optional[List[Any]] = None,
+        volumes: Optional[list] = None,
         memory_in_gb: Optional[Any] = None,
         cpu: Optional[Any] = None,
         gpu: Optional[Any] = None,
         command: Optional[str] = None,
         remove_on_error: bool = True,
         fail_if_exists: bool = True,
-        tags: Optional[Dict[str, str]] = None,
+        tags: Optional[dict] = None,

Review comment:
       Haha man we still support Py 2.7 for Airflow 1.10.x, imagine :D 




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