ashb commented on a change in pull request #15330:
URL: https://github.com/apache/airflow/pull/15330#discussion_r712206077



##########
File path: airflow/decorators/__init__.py
##########
@@ -15,129 +15,36 @@
 # specific language governing permissions and limitations
 # under the License.
 
-from typing import Callable, Dict, Iterable, List, Optional, Union
+from typing import TYPE_CHECKING
 
-from airflow.decorators.python import python_task
-from airflow.decorators.python_virtualenv import _virtualenv_task
+from airflow.decorators.python import PythonDecoratorMixin, python_task  # noqa
+from airflow.decorators.python_virtualenv import PythonVirtualenvDecoratorMixin
 from airflow.decorators.task_group import task_group  # noqa
 from airflow.models.dag import dag  # noqa
+from airflow.providers_manager import ProvidersManager
 
 
-class _TaskDecorator:
-    def __call__(
-        self, python_callable: Optional[Callable] = None, multiple_outputs: 
Optional[bool] = None, **kwargs
-    ):
-        """
-        Python operator decorator. Wraps a function into an Airflow operator.
-        Accepts kwargs for operator kwarg. This decorator can be reused in a 
single DAG.
+class _TaskDecorator(PythonDecoratorMixin, PythonVirtualenvDecoratorMixin):
+    def __getattr__(self, name):
+        if name.startswith("__"):
+            raise AttributeError(f'{type(self).__name__} has not attriubte 
{name!r}')

Review comment:
       What a mishmash of typing there. Shesh Ash 🙂 




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