You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2023/01/11 21:25:49 UTC

[airflow] 08/27: Move MyPY plugins of ours to dev folder (#28498)

This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-5-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 5d24d10035ec0ea10267e38a36c0bda3b19d7073
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Tue Dec 20 19:33:46 2022 +0100

    Move MyPY plugins of ours to dev folder (#28498)
    
    The Plugins are only used in the static check phase. The problem with
    having them in "airflow" package is that mypy imports "airlfow" during
    loading of the plugins and it means that it has to have fully working
    Airflow configuration to work - otherwise this import fails while
    reading the configuration values.
    
    Moving the whole mypy plugins to dev solves the problem entirely.
    
    (cherry picked from commit 1f75e9ffcf0e61115ea141bc1c5de5002ef8f2c0)
---
 .github/boring-cyborg.yml                  | 1 -
 {airflow => dev}/mypy/__init__.py          | 0
 {airflow => dev}/mypy/plugin/__init__.py   | 0
 {airflow => dev}/mypy/plugin/decorators.py | 0
 {airflow => dev}/mypy/plugin/outputs.py    | 0
 setup.cfg                                  | 4 ++--
 6 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml
index 0776ca1d0f..90f80674ec 100644
--- a/.github/boring-cyborg.yml
+++ b/.github/boring-cyborg.yml
@@ -83,7 +83,6 @@ labelPRBasedOnFilePath:
     - tests/www/api/**/*
 
   area:dev-tools:
-    - airflow/mypy/**/*
     - scripts/**/*
     - dev/**/*
     - .github/**/*
diff --git a/airflow/mypy/__init__.py b/dev/mypy/__init__.py
similarity index 100%
rename from airflow/mypy/__init__.py
rename to dev/mypy/__init__.py
diff --git a/airflow/mypy/plugin/__init__.py b/dev/mypy/plugin/__init__.py
similarity index 100%
rename from airflow/mypy/plugin/__init__.py
rename to dev/mypy/plugin/__init__.py
diff --git a/airflow/mypy/plugin/decorators.py b/dev/mypy/plugin/decorators.py
similarity index 100%
rename from airflow/mypy/plugin/decorators.py
rename to dev/mypy/plugin/decorators.py
diff --git a/airflow/mypy/plugin/outputs.py b/dev/mypy/plugin/outputs.py
similarity index 100%
rename from airflow/mypy/plugin/outputs.py
rename to dev/mypy/plugin/outputs.py
diff --git a/setup.cfg b/setup.cfg
index 2274d98e3a..5cc2a1342b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -174,8 +174,8 @@ no_implicit_optional = True
 warn_redundant_casts = True
 warn_unused_ignores = False
 plugins =
-  airflow.mypy.plugin.decorators,
-  airflow.mypy.plugin.outputs
+  dev.mypy.plugin.decorators,
+  dev.mypy.plugin.outputs
 pretty = True
 show_error_codes = True