Skip to content

[pyupgrade] Make fix unsafe if it deletes comments (UP045, UP007)#22772

Merged
ntBre merged 3 commits intoastral-sh:mainfrom
chirizxc:__UP
Jan 21, 2026
Merged

[pyupgrade] Make fix unsafe if it deletes comments (UP045, UP007)#22772
ntBre merged 3 commits intoastral-sh:mainfrom
chirizxc:__UP

Conversation

@chirizxc
Copy link
Contributor

Summary

Test Plan

@astral-sh-bot
Copy link

astral-sh-bot bot commented Jan 20, 2026

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +0 -10 fixes in 1 projects; 54 projects unchanged)

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

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

+ superset/charts/client_processing.py:285:17: UP045 Use `X | None` for type annotations
- superset/charts/client_processing.py:285:17: UP045 [*] Use `X | None` for type annotations
+ superset/db_engine_specs/snowflake.py:292:26: UP045 Use `X | None` for type annotations
- superset/db_engine_specs/snowflake.py:292:26: UP045 [*] Use `X | None` for type annotations
+ superset/db_engine_specs/snowflake.py:314:26: UP045 Use `X | None` for type annotations
- superset/db_engine_specs/snowflake.py:314:26: UP045 [*] Use `X | None` for type annotations
+ superset/models/helpers.py:2634:17: UP045 Use `X | None` for type annotations
- superset/models/helpers.py:2634:17: UP045 [*] Use `X | None` for type annotations
+ superset/models/helpers.py:897:29: UP045 Use `X | None` for type annotations
- superset/models/helpers.py:897:29: UP045 [*] Use `X | None` for type annotations

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
UP045 10 0 0 0 10

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +0 -10 fixes in 1 projects; 54 projects unchanged)

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

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

+ superset/charts/client_processing.py:285:17: UP045 Use `X | None` for type annotations
- superset/charts/client_processing.py:285:17: UP045 [*] Use `X | None` for type annotations
+ superset/db_engine_specs/snowflake.py:292:26: UP045 Use `X | None` for type annotations
- superset/db_engine_specs/snowflake.py:292:26: UP045 [*] Use `X | None` for type annotations
+ superset/db_engine_specs/snowflake.py:314:26: UP045 Use `X | None` for type annotations
- superset/db_engine_specs/snowflake.py:314:26: UP045 [*] Use `X | None` for type annotations
+ superset/models/helpers.py:2634:17: UP045 Use `X | None` for type annotations
- superset/models/helpers.py:2634:17: UP045 [*] Use `X | None` for type annotations
+ superset/models/helpers.py:897:29: UP045 Use `X | None` for type annotations
- superset/models/helpers.py:897:29: UP045 [*] Use `X | None` for type annotations

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
UP045 10 0 0 0 10

@ntBre ntBre added the fixes Related to suggested fixes for violations label Jan 21, 2026
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Thank you!

@ntBre ntBre merged commit e8c93c8 into astral-sh:main Jan 21, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes Related to suggested fixes for violations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants