potiuk commented on a change in pull request #21429:
URL: https://github.com/apache/airflow/pull/21429#discussion_r801888484



##########
File path: airflow/providers/docker/operators/docker.py
##########
@@ -35,6 +35,15 @@
     from airflow.utils.context import Context
 
 
+def stringify(line: Union[str, bytes]):
+    """Make sure string is returned even if bytes are passed. Docker stream 
can return bytes."""
+    decode_method = getattr(line, 'decode', None)

Review comment:
       This looks a bit weird but is the cleanest way to make MyPy happy: 
https://github.com/python/mypy/issues/1424




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