Skip to content

[flake8-pyi] Rename PYI033 to legacy-type-comment - #26131

Merged
AlexWaygood merged 2 commits into
mainfrom
alex/rename-pyi033-legacy-type-comment
Jun 18, 2026
Merged

[flake8-pyi] Rename PYI033 to legacy-type-comment#26131
AlexWaygood merged 2 commits into
mainfrom
alex/rename-pyi033-legacy-type-comment

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member

Summary

Rename PYI033 from type-comment-in-stub to legacy-type-comment, including the internal rule, module, and preview-helper identifiers.

The new name reflects that the rule also runs on Python files in preview mode, rather than implying that it only applies to stub files.

@AlexWaygood AlexWaygood added the rule Implementing or modifying a lint rule label Jun 18, 2026
@AlexWaygood
AlexWaygood marked this pull request as ready for review June 18, 2026 15:31
@astral-sh-bot
astral-sh-bot Bot requested a review from ntBre June 18, 2026 15:31
@AlexWaygood

Copy link
Copy Markdown
Member Author

(Followup to #26129)

@astral-sh-bot

astral-sh-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+28 -28 violations, +0 -0 fixes in 3 projects; 53 projects unchanged)

PlasmaPy/PlasmaPy (+11 -11 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --no-fix --output-format concise --preview

+ src/plasmapy/analysis/fit_functions.py:35:36: legacy-type-comment Don't use type comments
- src/plasmapy/analysis/fit_functions.py:35:36: type-comment-in-stub Don't use type comments
+ tests/analysis/test_fit_functions.py:66:36: legacy-type-comment Don't use type comments
- tests/analysis/test_fit_functions.py:66:36: type-comment-in-stub Don't use type comments
+ tests/analysis/test_fit_functions.py:67:42: legacy-type-comment Don't use type comments
- tests/analysis/test_fit_functions.py:67:42: type-comment-in-stub Don't use type comments
+ tests/analysis/test_fit_functions.py:68:41: legacy-type-comment Don't use type comments
- tests/analysis/test_fit_functions.py:68:41: type-comment-in-stub Don't use type comments
+ tests/analysis/test_fit_functions.py:69:39: legacy-type-comment Don't use type comments
- tests/analysis/test_fit_functions.py:69:39: type-comment-in-stub Don't use type comments
+ tests/analysis/test_fit_functions.py:70:36: legacy-type-comment Don't use type comments
- tests/analysis/test_fit_functions.py:70:36: type-comment-in-stub Don't use type comments
+ tests/utils/decorators/test_checks.py:66:62: legacy-type-comment Don't use type comments
- tests/utils/decorators/test_checks.py:66:62: type-comment-in-stub Don't use type comments
+ tests/utils/decorators/test_checks.py:785:64: legacy-type-comment Don't use type comments
- tests/utils/decorators/test_checks.py:785:64: type-comment-in-stub Don't use type comments
+ tests/utils/decorators/test_validators.py:164:12: legacy-type-comment Don't use type comments
- tests/utils/decorators/test_validators.py:164:12: type-comment-in-stub Don't use type comments
+ tests/utils/decorators/test_validators.py:27:67: legacy-type-comment Don't use type comments
... 2 additional changes omitted for rule legacy-type-comment
... 3 additional changes omitted for project

apache/airflow (+12 -12 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --no-fix --output-format concise --preview --select ALL

+ performance/src/performance_dags/performance_dag/performance_dag.py:131:5: legacy-type-comment Don't use type comments
- performance/src/performance_dags/performance_dag/performance_dag.py:131:5: type-comment-in-stub Don't use type comments
+ performance/src/performance_dags/performance_dag/performance_dag.py:149:5: legacy-type-comment Don't use type comments
- performance/src/performance_dags/performance_dag/performance_dag.py:149:5: type-comment-in-stub Don't use type comments
+ performance/src/performance_dags/performance_dag/performance_dag.py:182:5: legacy-type-comment Don't use type comments
- performance/src/performance_dags/performance_dag/performance_dag.py:182:5: type-comment-in-stub Don't use type comments
+ performance/src/performance_dags/performance_dag/performance_dag.py:71:5: legacy-type-comment Don't use type comments
- performance/src/performance_dags/performance_dag/performance_dag.py:71:5: type-comment-in-stub Don't use type comments
+ performance/src/performance_dags/performance_dag/performance_dag.py:84:5: legacy-type-comment Don't use type comments
- performance/src/performance_dags/performance_dag/performance_dag.py:84:5: type-comment-in-stub Don't use type comments
+ performance/src/performance_dags/performance_dag/performance_dag_utils.py:641:5: legacy-type-comment Don't use type comments
- performance/src/performance_dags/performance_dag/performance_dag_utils.py:641:5: type-comment-in-stub Don't use type comments
+ performance/src/performance_dags/performance_dag/performance_dag_utils.py:679:5: legacy-type-comment Don't use type comments
- performance/src/performance_dags/performance_dag/performance_dag_utils.py:679:5: type-comment-in-stub Don't use type comments
+ providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:299:45: legacy-type-comment Don't use type comments
- providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:299:45: type-comment-in-stub Don't use type comments
+ providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:362:56: legacy-type-comment Don't use type comments
- providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:362:56: type-comment-in-stub Don't use type comments
+ providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:474:56: legacy-type-comment Don't use type comments
- providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:474:56: type-comment-in-stub Don't use type comments
+ providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:49:31: legacy-type-comment Don't use type comments
... 2 additional changes omitted for rule legacy-type-comment
... 3 additional changes omitted for project

apache/superset (+5 -5 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --no-fix --output-format concise --preview --select ALL

+ superset/db_engine_specs/ocient.py:100:14: legacy-type-comment Don't use type comments
- superset/db_engine_specs/ocient.py:100:14: type-comment-in-stub Don't use type comments
+ superset/db_engine_specs/ocient.py:113:13: legacy-type-comment Don't use type comments
- superset/db_engine_specs/ocient.py:113:13: type-comment-in-stub Don't use type comments
+ superset/db_engine_specs/ocient.py:126:18: legacy-type-comment Don't use type comments
- superset/db_engine_specs/ocient.py:126:18: type-comment-in-stub Don't use type comments
+ superset/db_engine_specs/ocient.py:151:15: legacy-type-comment Don't use type comments
- superset/db_engine_specs/ocient.py:151:15: type-comment-in-stub Don't use type comments
+ tests/integration_tests/superset_test_custom_template_processors.py:43:62: legacy-type-comment Don't use type comments
- tests/integration_tests/superset_test_custom_template_processors.py:43:62: type-comment-in-stub Don't use type comments

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
legacy-type-comment 28 28 0 0 0
type-comment-in-stub 28 0 28 0 0

@MichaReiser

Copy link
Copy Markdown
Member

From a past rename PR

I think the changes here should all be backwards-compatible, but we'll need to remember to add a redirect for the documentation after the next release (whether it is a minor release or patch release).

I don't think I've the necessary permissions anymore

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@AlexWaygood
AlexWaygood merged commit 19a4bea into main Jun 18, 2026
45 checks passed
@AlexWaygood
AlexWaygood deleted the alex/rename-pyi033-legacy-type-comment branch June 18, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants