dstandish commented on a change in pull request #20530:
URL: https://github.com/apache/airflow/pull/20530#discussion_r776109537



##########
File path: airflow/decorators/__init__.py
##########
@@ -29,9 +30,11 @@ def __getattr__(self, name):
         if name.startswith("__"):
             raise AttributeError(f'{type(self).__name__} has no attribute 
{name!r}')
         decorators = ProvidersManager().taskflow_decorators
-        if name not in decorators:
-            raise AttributeError(f"task decorator {name!r} not found")
-        return decorators[name]
+        if name in decorators:
+            return decorators[name]
+        if name == "sensor":
+            return sensor

Review comment:
       @dimberman can you comment on whether this is a good approach or whether 
instead we should do multiple inheritance with mixins as is done with 
`@task.virtualenv`?  i lean towards supporting the approach taken here but 
interested if you want to advocate for the mixin approach




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