Skip to content

Commit 2ea139e

Browse files
committed
Use a different variable name. Fixes #3961. Workaround for astral-sh/ruff#5249.
1 parent 767c968 commit 2ea139e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setuptools/tests/test_packageindex.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def test_bad_url_bad_port(self):
3131
url = 'http://127.0.0.1:0/nonesuch/test_package_index'
3232
try:
3333
v = index.open_url(url)
34-
except Exception as v:
35-
assert url in str(v)
34+
except Exception as exc:
35+
assert url in str(exc)
3636
else:
3737
assert isinstance(v, urllib.error.HTTPError)
3838

@@ -48,8 +48,8 @@ def test_bad_url_typo(self):
4848
)
4949
try:
5050
v = index.open_url(url)
51-
except Exception as v:
52-
assert url in str(v)
51+
except Exception as exc:
52+
assert url in str(exc)
5353
else:
5454
assert isinstance(v, urllib.error.HTTPError)
5555

0 commit comments

Comments
 (0)