Skip to content

Enforce ruff/refurb rules (FURB)#4386

Merged
jaraco merged 12 commits into
pypa:mainfrom
DimitriPapadopoulos:FURB
May 31, 2025
Merged

Enforce ruff/refurb rules (FURB)#4386
jaraco merged 12 commits into
pypa:mainfrom
DimitriPapadopoulos:FURB

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented May 23, 2024

Summary of changes

Follow-up of #4172.

Pull Request Checklist

@Avasam Avasam mentioned this pull request Jun 17, 2024
2 tasks
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the FURB branch 4 times, most recently from 39e788a to c6d0727 Compare June 28, 2024 17:30
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review June 28, 2024 17:40
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as draft June 28, 2024 17:42
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review June 28, 2024 18:08
@DimitriPapadopoulos DimitriPapadopoulos changed the title Enforce ruff/refurb rules Enforce ruff/refurb rules (FURB) Jun 28, 2024
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the FURB branch 2 times, most recently from 44c33c5 to 6b2b9ac Compare August 3, 2024 20:40
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the FURB branch 2 times, most recently from a563475 to 3477d01 Compare August 18, 2024 14:57
@Avasam
Copy link
Copy Markdown
Contributor

Avasam commented Aug 19, 2024

Looks like you're missing imports for operator

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

I think I mistakenly removed the imports while rebasing. Should be fixed now.

Comment thread setuptools/tests/test_wheel.py Outdated
@DimitriPapadopoulos DimitriPapadopoulos changed the title Enforce more rules: ruff/refurb (FURB) and ruff/flake8-comprehensions (C4) Enforce ruff/refurb rules (FURB) Jan 1, 2025
@Avasam
Copy link
Copy Markdown
Contributor

Avasam commented Jan 3, 2025

@DimitriPapadopoulos I think you're missing a ruff.toml change adding FURB

@Avasam
Copy link
Copy Markdown
Contributor

Avasam commented Jan 3, 2025

Now that this is back to being a simpler PR. @abravalheri / @jaraco refurb would also have been one of my suggestions with improvements in readability and simplifications.

Comment thread setuptools/command/egg_info.py Outdated
@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

Rebased.

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

DimitriPapadopoulos and others added 10 commits May 23, 2025 17:05
FURB118 Use `operator.itemgetter(0)` instead of defining a lambda
FURB142 Use of `set.add()` in a for loop
FURB167 Use of regular expression alias `re.I`
FURB167 Use of regular expression alias `re.M`
FURB167 Use of regular expression alias `re.S`
FURB167 Use of regular expression alias `re.X`
FURB188 Prefer `removesuffix` over conditionally replacing with slice.
FURB192 Prefer `max` over `sorted()` to compute the maximum value in a sequence
Co-authored-by: Avasam <samuel.06@hotmail.com>
DimitriPapadopoulos and others added 2 commits May 25, 2025 10:49
Co-authored-by: Avasam <samuel.06@hotmail.com>
@jaraco jaraco merged commit b8f8bcc into pypa:main May 31, 2025
18 of 20 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the FURB branch June 1, 2025 16:02
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