diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29762c19136c2..6cfd45fb80792 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -173,7 +173,7 @@ repos: entry: ./scripts/ci/pre_commit/update_common_sql_api_stubs.py language: python files: ^scripts/ci/pre_commit/update_common_sql_api\.py|^providers/src/airflow/providers/common/sql/.*\.pyi?$ - additional_dependencies: ['rich>=12.4.4', 'mypy==1.9.0', 'black==23.10.0', 'jinja2'] + additional_dependencies: ['rich>=12.4.4', 'mypy==1.12.0', 'black==23.10.0', 'jinja2'] pass_filenames: false require_serial: true - id: update-black-version diff --git a/airflow/models/dag.py b/airflow/models/dag.py index f0a7d7f56be2c..65dd8c2f16807 100644 --- a/airflow/models/dag.py +++ b/airflow/models/dag.py @@ -2205,7 +2205,7 @@ def pickle(self, session=NEW_SESSION) -> DagPickle: def task(self) -> TaskDecoratorCollection: from airflow.decorators import task - return cast("TaskDecoratorCollection", functools.partial(task, dag=self)) + return cast("TaskDecoratorCollection", functools.partial(task, dag=self)) # type: ignore[misc] def add_task(self, task: Operator) -> None: """ diff --git a/hatch_build.py b/hatch_build.py index d289d36d8f519..2fa731f53ee04 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -215,7 +215,7 @@ # TODO: upgrade to newer versions of MyPy continuously as they are released # Make sure to upgrade the mypy version in update-common-sql-api-stubs in .pre-commit-config.yaml # when you upgrade it here !!!! - "mypy==1.9.0", + "mypy==1.12.0", "types-Deprecated", "types-Markdown", "types-PyMySQL", diff --git a/tests/dags/test_task_view_type_check.py b/tests/dags/test_task_view_type_check.py index f3414d4ac3fe5..f89ffb24ecb1f 100644 --- a/tests/dags/test_task_view_type_check.py +++ b/tests/dags/test_task_view_type_check.py @@ -46,7 +46,7 @@ def a_function(_, __): """A function with two args""" -partial_function = functools.partial(a_function, arg_x=1) +partial_function = functools.partial(a_function, 1) class_instance = CallableClass() logger.info("class_instance type: %s", type(class_instance))