Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce ruff/pyupgrade rules (UP) #4379

Merged
merged 8 commits into from
Dec 31, 2024
Merged

Enforce ruff/pyupgrade rules (UP) #4379

merged 8 commits into from
Dec 31, 2024

Conversation

DimitriPapadopoulos
Copy link
Contributor

Summary of changes

Enforce ruff/pyupgrade rules (UP).

Follow-up of #4125.

Pull Request Checklist

@Avasam
Copy link
Contributor

Avasam commented May 22, 2024

You should ignore UP038 too ! astral-sh/ruff#7871

ruff.toml Outdated Show resolved Hide resolved
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the UP branch 6 times, most recently from 4b1668e to 2b3c085 Compare May 23, 2024 07:18
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the UP branch 2 times, most recently from 78ff278 to 6347575 Compare June 28, 2024 18:28
@DimitriPapadopoulos DimitriPapadopoulos changed the title Enforce ruff/pyupgrade rules Enforce ruff/pyupgrade rules (UP) Jun 28, 2024
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the UP branch 2 times, most recently from 172fe8d to 5360321 Compare June 28, 2024 18:40
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review June 28, 2024 18:48
Copy link
Contributor

@Avasam Avasam left a comment

Choose a reason for hiding this comment

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

Some comments and imo potential non-automated improvements I noticed from also having applied UP03 in other projects

pkg_resources/__init__.py Show resolved Hide resolved
pkg_resources/__init__.py Show resolved Hide resolved
pkg_resources/tests/test_pkg_resources.py Show resolved Hide resolved
setuptools/command/easy_install.py Show resolved Hide resolved
setuptools/package_index.py Show resolved Hide resolved
setuptools/package_index.py Outdated Show resolved Hide resolved
setuptools/tests/config/test_setupcfg.py Outdated Show resolved Hide resolved
pkg_resources/__init__.py Show resolved Hide resolved
pkg_resources/__init__.py Outdated Show resolved Hide resolved
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the UP branch 6 times, most recently from 8c26c35 to 02086f8 Compare July 3, 2024 06:58
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the UP branch 2 times, most recently from ba3eccc to eb25d9a Compare August 3, 2024 20:34
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the UP branch 4 times, most recently from 1499a0a to c6bc8e7 Compare August 18, 2024 14:03
@DimitriPapadopoulos
Copy link
Contributor Author

Restarted from scratch, it's easier and less error-prone than rebasing.

@Avasam
Copy link
Contributor

Avasam commented Sep 18, 2024

Might wanna disable UP027 too (I've done so here: #4558)

@Avasam
Copy link
Contributor

Avasam commented Sep 30, 2024

CI failure looks completely unrelated, I got the same thing here: https://github.com/pypa/setuptools/actions/runs/11113018762/job/30876386043?pr=4556

@Avasam
Copy link
Contributor

Avasam commented Dec 31, 2024

@jaraco and/or @abravalheri Can this be reviewed? Finishing to enable all UP rules is a PR I would've done as well if this one didn't already exists.

@jaraco jaraco merged commit 53d5ac2 into pypa:main Dec 31, 2024
21 of 23 checks passed
@jaraco
Copy link
Member

jaraco commented Dec 31, 2024

Looks great. Thanks!

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.

3 participants