Skip to content

Commit

Permalink
bump mypy version to 1.9.0 (#38239)
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala committed Mar 18, 2024
1 parent f3982aa commit 2523cbf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -172,7 +172,7 @@ repos:
entry: ./scripts/ci/pre_commit/pre_commit_update_common_sql_api_stubs.py
language: python
files: ^scripts/ci/pre_commit/pre_commit_update_common_sql_api\.py|^airflow/providers/common/sql/.*\.pyi?$
additional_dependencies: ['rich>=12.4.4', 'mypy==1.8.0', 'black==23.10.0', 'jinja2']
additional_dependencies: ['rich>=12.4.4', 'mypy==1.9.0', 'black==23.10.0', 'jinja2']
pass_filenames: false
require_serial: true
- id: update-black-version
Expand Down
8 changes: 6 additions & 2 deletions airflow/providers/apache/beam/operators/beam.py
Expand Up @@ -415,7 +415,9 @@ async def execute_async(self, context: Context):
# This means we can perform asynchronous operations with this file.
create_tmp_file_call = gcs_hook.provide_file(object_url=self.py_file)
tmp_gcs_file: IO[str] = await loop.run_in_executor(
None, contextlib.ExitStack().enter_context, create_tmp_file_call
None,
contextlib.ExitStack().enter_context, # type: ignore[arg-type]
create_tmp_file_call,
)
self.py_file = tmp_gcs_file.name

Expand Down Expand Up @@ -612,7 +614,9 @@ async def execute_async(self, context: Context):
# This means we can perform asynchronous operations with this file.
create_tmp_file_call = gcs_hook.provide_file(object_url=self.jar)
tmp_gcs_file: IO[str] = await loop.run_in_executor(
None, contextlib.ExitStack().enter_context, create_tmp_file_call
None,
contextlib.ExitStack().enter_context, # type: ignore[arg-type]
create_tmp_file_call,
)
self.jar = tmp_gcs_file.name

Expand Down
3 changes: 2 additions & 1 deletion airflow/providers/smtp/hooks/smtp.py
Expand Up @@ -275,7 +275,8 @@ def _build_mime_message(

msg = MIMEMultipart(mime_subtype)
msg["Subject"] = subject
msg["From"] = mail_from
if mail_from:
msg["From"] = mail_from
msg["To"] = ", ".join(to)
recipients = to
if cc:
Expand Down
3 changes: 2 additions & 1 deletion airflow/utils/email.py
Expand Up @@ -186,7 +186,8 @@ def build_mime_message(

msg = MIMEMultipart(mime_subtype)
msg["Subject"] = subject
msg["From"] = mail_from
if mail_from:
msg["From"] = mail_from
msg["To"] = ", ".join(to)
recipients = to
if cc:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -312,7 +312,7 @@ devel-mypy = [
# 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.8.0",
"mypy==1.9.0",
"types-Deprecated",
"types-Markdown",
"types-PyMySQL",
Expand Down

0 comments on commit 2523cbf

Please sign in to comment.