XD-DENG commented on a change in pull request #15512: URL: https://github.com/apache/airflow/pull/15512#discussion_r619609927
########## File path: CONTRIBUTING.rst ########## @@ -946,6 +946,23 @@ Most of our coding style rules are enforced programmatically by flake8 and pylin on every pull request), but there are some rules that are not yet automated and are more Airflow specific or semantic than style +Using Asserts Outside Tests +--------------------------- + +Our community agreed that to various reasons we **do not use ``assert`` in production code** of Apache Airflow. +For details check the relevant [mailing list thread](https://lists.apache.org/thread.html/bcf2d23fcd79e21b3aac9f32914e1bf656e05ffbcb8aa282af497a2d%40%3Cdev.airflow.apache.org%3E). + +In other words instead of doing: + +.. code-block:: python Review comment: I also notice this: <img width="736" alt="Add_code_style_note__no_asserts_by_turbaszek_·_Pull_Request__15512_·_apache_airflow" src="https://user-images.githubusercontent.com/11539188/115952276-524a5000-a4e5-11eb-9397-7102ab5c258d.png"> It's quite nit and I don't have a clue how to make it more "beautiful", so will approve first. Thanks @turbaszek 👍 -- 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. For queries about this service, please contact Infrastructure at: [email protected]
