You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/02/12 14:03:42 UTC

[GitHub] [airflow] feluelle commented on a change in pull request #6597: [AIRFLOW-6005] Common classes should always be imported from airflow, Depends on [AIRFLOW-6128]

feluelle commented on a change in pull request #6597: [AIRFLOW-6005] Common classes should always be imported from airflow, Depends on [AIRFLOW-6128]
URL: https://github.com/apache/airflow/pull/6597#discussion_r378268793
 
 

 ##########
 File path: .pre-commit-config.yaml
 ##########
 @@ -237,6 +237,43 @@ repos:
           ^airflow/sensors/.*$|
           ^airflow/providers/.*\.py$|
           ^airflow/contrib/.*\.py$
+      - id: common-imports
+        language: pygrep
+        name: Make sure LoggingMixin is imported consistently 'from airflow'
+        entry: "from airflow\\.utils\\.log\\.logging_mixin import.* LoggingMixin"
+        pass_filenames: true
+        exclude: >
+          (?x)
+          ^airflow/__init__\.py$|
+          ^airflow/plugins_manager.py$|
+          ^airflow/configuration.py$|
+          ^airflow/utils/sqlalchemy.py$
+        files: \.py$
+      - id: common-imports
+        language: pygrep
+        name: Make sure conf is imported consistently 'from airflow'
+        entry: "from airflow\\.configuration import.* conf"
+        pass_filenames: true
+        exclude: >
+          (?x)
+          ^airflow/__init__\.py$|
+          ^airflow/logging_config.py$|
+          ^airflow/settings.py$
+        files: \.py$
+      - id: common-imports
+        language: pygrep
+        name: Make sure AirflowConfigException is imported consistently 'from airflow'
+        entry: "from airflow\\.exception import.* AirflowConfigException"
 
 Review comment:
   ```suggestion
           entry: "from airflow\\.exceptions import.* AirflowConfigException"
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services