Skip to content

[proposal] pyupgrade ruff rule#447

Merged
yokomotod merged 6 commits intomasterfrom
lint-pyupgrade
Mar 15, 2025
Merged

[proposal] pyupgrade ruff rule#447
yokomotod merged 6 commits intomasterfrom
lint-pyupgrade

Conversation

@yokomotod
Copy link
Copy Markdown
Collaborator

@yokomotod yokomotod commented Mar 5, 2025

ruff's pyupgrade (UP) rule from https://github.com/asottile/pyupgrade enforce better new syntax.

ex.

  • Union[X, Y] => X | Y
  • typing. Dict => dict
  • "hoge {}".format(x) => f"hoge {x}"

for more detail, https://github.com/m3dev/gokart/actions/runs/13666691452/job/38209273281?pr=447

@yokomotod
Copy link
Copy Markdown
Collaborator Author

how do you think? if it sounds good, I'll fix lint errors

Copy link
Copy Markdown
Contributor

@mski-iksm mski-iksm left a comment

Choose a reason for hiding this comment

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

LGTM!

@hirosassa
Copy link
Copy Markdown
Collaborator

@yokomotod Could you check conflicted files?

@yokomotod
Copy link
Copy Markdown
Collaborator Author

Conflict resolved.

@yokomotod yokomotod merged commit e99c591 into master Mar 15, 2025
8 checks passed
@yokomotod yokomotod deleted the lint-pyupgrade branch March 15, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants