You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "HsuehYi (via GitHub)" <gi...@apache.org> on 2026/10/19 09:38:57 UTC
[PR] Remove unused type: ignore comments in airflow-core [airflow]
HsuehYi opened a new pull request, #75078:
URL: https://github.com/apache/airflow/pull/75078
`mypy --warn-unused-ignores` — exposed to contributors as
`SHOW_UNUSED_MYPY_WARNINGS=true prek run mypy-airflow-core --all-files`
(see `contributing-docs/08_static_code_checks.rst`) — reports stale `# type: ignore`
comments in `airflow-core`: 61 comments that suppress nothing at all, and 3 that
list an unused error code next to a live one. Stale suppressions make it hard to
tell which ignores are still load-bearing, so this PR drops the dead comments and
narrows the remaining brackets to the codes they actually need.
**Changes** (28 files, all in `airflow-core`):
- removed 61 whole-comment `# type: ignore` suppressions (src + tests);
- narrowed 3 brackets:
- `src/airflow/timetables/simple.py:47`: `[misc,no-redef]` → `[no-redef]`
- `tests/unit/plugins/test_plugins_manager.py:278/279`: `[list-item, typeddict-item]` → `[typeddict-item]`
- `src/airflow/api_fastapi/core_api/routes/public/extra_links.py`: with the trailing
comment gone, `ruff format` keeps the generator expression on one line.
**Verification (run locally):**
- `prek run mypy-airflow-core --all-files` → passed
- `SHOW_UNUSED_MYPY_WARNINGS=true prek run mypy-airflow-core --all-files` → passed
(no unused ignores remain)
- commit hook suite: passed; `generate-openapi-spec` skipped locally because the
Docker daemon was not running — the change is comment-only, so the API spec is
unaffected and CI re-runs the hook.
No runtime behaviour changes; no tests were run beyond the checks above.
<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->
<!--
Thank you for contributing!
Please provide above a brief description of the changes made in this pull request.
Write a good git commit message following this guide: https://chris.beams.io/posts/git-commit/
Please make sure that your code changes are covered with tests.
And in case of new features or big changes remember to adjust the documentation.
For user-facing UI changes, please attach before/after screenshots (or a short
screen recording) so reviewers can assess the visual impact.
Feel free to ping (in general) for the review if you do not see reaction for a few days
(72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
In case of an existing issue, reference it using one of the following:
* closes: #ISSUE
* related: #ISSUE
-->
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR, please
change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by".
-->
- [x] Yes (please specify the tool below)
Generated-by: OpenCode (DeepSeek V4.1 Flash Free) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
<!--
Generated-by: [Tool Name] following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
-->
---
* Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
* For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
* When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
* For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unused type: ignore comments in airflow-core [airflow]
Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck merged PR #75078:
URL: https://github.com/apache/airflow/pull/75078
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unused type: ignore comments in airflow-core [airflow]
Posted by "HsuehYi (via GitHub)" <gi...@apache.org>.
HsuehYi commented on code in PR #75078:
URL: https://github.com/apache/airflow/pull/75078#discussion_r4312380806
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py:
##########
@@ -120,10 +120,7 @@ def get_extra_links(
)
]
- all_extra_link_pairs = (
- (link_name, task.get_extra_links(ti, link_name))
- for link_name in link_names # type: ignore[arg-type]
- )
+ all_extra_link_pairs = ((link_name, task.get_extra_links(ti, link_name)) for link_name in link_names)
Review Comment:
Formatting-only change: now that the trailing # type: ignore comment is gone, ruff format keeps the generator expression on one line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org