Skip to content

Commit

Permalink
Disable and revert unpacked-list-comprehension (UP027)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Aug 12, 2024
1 parent a6f7484 commit 27bf87d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ignore = [
"TRY003", # raise-vanilla-args, avoid multitude of exception classes
"TRY301", # raise-within-try, it's handy
"UP015", # redundant-open-modes, explicit is preferred
"UP027", # unpacked-list-comprehension, is actually slower for cases relevant to unpacking, set for deprecation: https://github.com/astral-sh/ruff/issues/12754
"UP030", # temporarily disabled
"UP031", # temporarily disabled
"UP032", # temporarily disabled
Expand Down
6 changes: 1 addition & 5 deletions setuptools/package_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

from .unicode_utils import _read_utf8_with_fallback, _cfg_read_utf8_with_fallback


EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I)
PYPI_MD5 = re.compile(
Expand Down Expand Up @@ -560,10 +559,7 @@ def not_found_in_index(self, requirement):
if self[requirement.key]: # we've seen at least one distro
meth, msg = self.info, "Couldn't retrieve index page for %r"
else: # no distros seen for this name, might be misspelled
meth, msg = (
self.warn,
"Couldn't find index page for %r (maybe misspelled?)",
)
meth, msg = self.warn, "Couldn't find index page for %r (maybe misspelled?)"
meth(msg, requirement.unsafe_name)
self.scan_all()

Expand Down
4 changes: 2 additions & 2 deletions setuptools/tests/test_egg_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ def parametrize(*test_list, **format_dict):
else:
install_cmd_kwargs = {}
name = name_kwargs[0].strip()
setup_py_requires, setup_cfg_requires, expected_requires = (
setup_py_requires, setup_cfg_requires, expected_requires = [
DALS(a).format(**format_dict) for a in test_params
)
]
for id_, requires, use_cfg in (
(name, setup_py_requires, False),
(name + '_in_setup_cfg', setup_cfg_requires, True),
Expand Down

0 comments on commit 27bf87d

Please sign in to comment.