Skip to content

Commit

Permalink
Fix configuration of mypy plugins to point to paths not modules (apac…
Browse files Browse the repository at this point in the history
…he#36563)

The configuration of our MyPy plugins was wrongly pointing to
modules rather than paths. This caused problems in the environment
where you had no PYTHONPATH set pointing to the root of your
Airflow sources. One of the side effects was that MyPy Plugin
for IntelliJ failed with "invalid plugin" error.

This PR changes the plugins to use relative paths instead - which
should work when mypy is invoked from the root of the
project (which in general is how our mypy gets invoked anyway and
is the default settings for most IDE integrations.
  • Loading branch information
potiuk authored Jan 3, 2024
1 parent e89b1aa commit 8fba23f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = False
plugins =
dev.mypy.plugin.decorators,
dev.mypy.plugin.outputs
dev/mypy/plugin/decorators.py,
dev/mypy/plugin/outputs.py
pretty = True
show_error_codes = True
# Mypy since 0.991 warns about type annotations being present in an untyped
Expand Down

0 comments on commit 8fba23f

Please sign in to comment.