Skip to content

Commit

Permalink
Apply refurb suggestion (#939)
Browse files Browse the repository at this point in the history
[FURB102]: Replace `x.endswith(y) or x.endswith(z)` with `x.endswith((y, z))`

Co-authored-by: Brian Rutledge <brian@bhrutledge.com>
  • Loading branch information
DimitriPapadopoulos and bhrutledge committed Dec 5, 2022
1 parent 591e46b commit f9461a4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions twine/wininst.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ def read_file(name: str) -> bytes:

try:
tuples = [
x.split("/")
for x in names
if x.endswith(".egg-info") or x.endswith("PKG-INFO")
x.split("/") for x in names if x.endswith((".egg-info", "PKG-INFO"))
]
schwarz = sorted((len(x), x) for x in tuples)
for path in [x[1] for x in schwarz]:
Expand Down

0 comments on commit f9461a4

Please sign in to comment.