Skip to content

Commit

Permalink
Fix all mypy-core references to mypy-airflow (#38046)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahar1 authored Mar 11, 2024
1 parent ac5f720 commit ccc9bb5
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 45 deletions.
14 changes: 7 additions & 7 deletions contributing-docs/08_static_code_checks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,13 @@ code. But you can run pre-commit hooks manually as needed.

.. code-block:: bash
pre-commit run mypy-core
pre-commit run mypy-airflow
- Run only mypy checks on all files by using:

.. code-block:: bash
pre-commit run mypy-core --all-files
pre-commit run mypy-airflow --all-files
- Run all checks on all files by using:
Expand Down Expand Up @@ -424,7 +424,7 @@ code. But you can run pre-commit hooks manually as needed.

.. code-block:: bash
SKIP=mypy-core,ruff pre-commit run --all-files
SKIP=mypy-airflow,ruff pre-commit run --all-files
You can always skip running the tests by providing ``--no-verify`` flag to the
Expand All @@ -439,7 +439,7 @@ In case you have a problem with running particular ``pre-commit`` check you can
benefits of having ``pre-commit`` installed, with some of the checks disabled. In order to disable
checks you might need to set ``SKIP`` environment variable to coma-separated list of checks to skip. For example,
when you want to skip some checks (ruff/mypy for example), you should be able to do it by setting
``export SKIP=ruff,mypy-core,``. You can also add this to your ``.bashrc`` or ``.zshrc`` if you
``export SKIP=ruff,mypy-airflow,``. You can also add this to your ``.bashrc`` or ``.zshrc`` if you
do not want to set it manually every time you enter the terminal.

In case you do not have breeze image configured locally, you can also disable all checks that require breeze
Expand Down Expand Up @@ -499,13 +499,13 @@ Run the ``mypy`` check for the currently staged changes (in ``airflow/`` excludi

.. code-block:: bash
breeze static-checks --type mypy-core
breeze static-checks --type mypy-airflow
Run the ``mypy`` check for all files:

.. code-block:: bash
breeze static-checks --type mypy-core --all-files
breeze static-checks --type mypy-airflow --all-files
Run the ``ruff`` check for the ``tests/core.py`` file with verbose output:

Expand Down Expand Up @@ -549,7 +549,7 @@ Run all checks for all changes in my branch since branched from main:

.. code-block:: bash
breeze static-checks --type mypy-core --only-my-changes
breeze static-checks --type mypy-airflow --only-my-changes
More examples can be found in
`Breeze documentation <../dev/breeze/doc/03_developer_tasks.rst#running-static-checks>`_
Expand Down
4 changes: 2 additions & 2 deletions dev/breeze/doc/ci/04_selective_checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ We have the following Groups of files for CI that determine which tests are run:
* `All Python files` - if none of the Python file changed, that indicates that we should not run unit tests
* `All source files` - if none of the sources change, that indicates that we should probably not build
an image and run any image-based static checks
* `All Airflow Python files` - files that are checked by `mypy-core` static checks
* `All Airflow Python files` - files that are checked by `mypy-airflow` static checks
* `All Providers Python files` - files that are checked by `mypy-providers` static checks
* `All Dev Python files` - files that are checked by `mypy-dev` static checks
* `All Docs Python files` - files that are checked by `mypy-docs` static checks
Expand Down Expand Up @@ -140,7 +140,7 @@ when some files are not changed. Those are the rules implemented:
* If "full tests" mode is detected, no more pre-commits are skipped - we run all of them
* The following checks are skipped if those files are not changed:
* if no `All Providers Python files` changed - `mypy-providers` check is skipped
* if no `All Airflow Python files` changed - `mypy-core` check is skipped
* if no `All Airflow Python files` changed - `mypy-airflow` check is skipped
* if no `All Docs Python files` changed - `mypy-docs` check is skipped
* if no `All Dev Python files` changed - `mypy-dev` check is skipped
* if no `WWW files` changed - `ts-compile-format-lint-www` check is skipped
Expand Down
2 changes: 1 addition & 1 deletion dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ def skip_pre_commits(self) -> str:
# whole package rather than for individual files. That's why we skip those checks in CI
# and run them via `mypy-all` command instead and dedicated CI job in matrix
# This will also speed up static-checks job usually as the jobs will be running in parallel
pre_commits_to_skip.update({"mypy-providers", "mypy-core", "mypy-docs", "mypy-dev"})
pre_commits_to_skip.update({"mypy-providers", "mypy-airflow", "mypy-docs", "mypy-dev"})
if self._default_branch != "main":
# Skip those tests on all "release" branches
pre_commits_to_skip.update(
Expand Down
Loading

0 comments on commit ccc9bb5

Please sign in to comment.