You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taragolis (via GitHub)" <gi...@apache.org> on 2023/09/21 19:37:52 UTC

[GitHub] [airflow] Taragolis commented on a diff in pull request #34512: Ban import AirflowException from airflow

Taragolis commented on code in PR #34512:
URL: https://github.com/apache/airflow/pull/34512#discussion_r1333521508


##########
pyproject.toml:
##########
@@ -144,6 +145,9 @@ combine-as-imports = true
 "tests/providers/elasticsearch/log/elasticmock/__init__.py" = ["E402"]
 "tests/providers/elasticsearch/log/elasticmock/utilities/__init__.py" = ["E402"]
 
+[tool.ruff.flake8-tidy-imports.banned-api]
+"airflow.AirflowException".msg = "Use airflow.exceptions.AirflowException instead."

Review Comment:
   I've also thought about it and I remembered that I used this import myself from the first days with Airflow (1.10.4 will remain in my heart forever) as DAD Author.
   
   Better what we could do it deprecate it because in general this import is useless, even for end-users the reason is simple all other exceptions such as `AirflowSkipException`, `AirflowFailException` do-not lazy loaded in `airflow.__init__`



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