feluelle commented on a change in pull request #5786:  [AIRFLOW-5170] Fix 
encoding pragmas, consistent licences for python files and related pylint fixes
URL: https://github.com/apache/airflow/pull/5786#discussion_r314887982
 
 

 ##########
 File path: airflow/contrib/hooks/qubole_hook.py
 ##########
 @@ -229,28 +236,29 @@ def get_extra_links(self, operator, dttm):
         return url
 
     def create_cmd_args(self, context):
+        """Creates command arguments"""
         args = []
         cmd_type = self.kwargs['command_type']
         inplace_args = None
         tags = {self.dag_id, self.task_id, context['run_id']}
         positional_args_list = flatten_list(POSITIONAL_ARGS.values())
 
-        for k, v in self.kwargs.items():
-            if k in COMMAND_ARGS[cmd_type]:
-                if k in HYPHEN_ARGS:
-                    args.append("--{0}={1}".format(k.replace('_', '-'), v))
-                elif k in positional_args_list:
-                    inplace_args = v
-                elif k == 'tags':
-                    if isinstance(v, str):
-                        tags.add(v)
-                    elif isinstance(v, (list, tuple)):
-                        for val in v:
+        for key, value in self.kwargs.items():  # pylint: 
disable=too-many-nested-blocks
+            if key in COMMAND_ARGS[cmd_type]:
+                if key in HYPHEN_ARGS:
+                    args.append("--{0}={1}".format(key.replace('_', '-'), 
value))
+                elif key in positional_args_list:
+                    inplace_args = value
+                elif key == 'tags':
+                    if isinstance(value, str):
+                        tags.add(value)
+                    elif isinstance(value, (list, tuple)):
+                        for val in value:
 
 Review comment:
   `tags.extend(value)` instead of the loop?

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