turbaszek commented on a change in pull request #20530: URL: https://github.com/apache/airflow/pull/20530#discussion_r778391201
########## 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: I think the same goes for other builtins (python for example). We either register them in `ProviderManager` upfront and raise an error when adding provider decorators or check here in init for possible name clash. @dimberman @kaxil @potiuk happy to hear your opinion here 🤔 -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org