You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/01 16:05:29 UTC
[GitHub] [airflow] ashb commented on a change in pull request #15330: Add a Docker Taskflow decorator
ashb commented on a change in pull request #15330:
URL: https://github.com/apache/airflow/pull/15330#discussion_r700358693
##########
File path: airflow/decorators/__init__.py
##########
@@ -15,34 +15,58 @@
# specific language governing permissions and limitations
# under the License.
-from typing import Callable, Optional
-
-from airflow.decorators.python import python_task
-from airflow.decorators.python_virtualenv import _virtualenv_task
+from airflow.decorators.python import PythonDecoratorMixin
+from airflow.decorators.python_virtualenv import PythonVirtualenvDecoratorMixin
from airflow.decorators.task_group import task_group # noqa
from airflow.exceptions import AirflowException
from airflow.models.dag import dag # noqa
from airflow.providers_manager import ProvidersManager
+# [START import_docker]
+try:
+ from airflow.providers.docker.decorators.docker import DockerDecoratorMixin
+except ImportError:
+ DockerDecoratorMixin = None
+# [END import_docker]
+
class _TaskDecorator:
Review comment:
We can mix these ones in directly:
```python
class _TaskDecorator(PythonDecoratorMixin, DockerDecoratorMixin):
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org