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 Sep 18, 2024
1 parent 3106af0 commit 644c69d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ extend-select = [

# local
"ANN2", # missing-return-type-*
"FA", # flake8-future-annotations
"F404", # late-future-import
"FA", # flake8-future-annotations
"I", # isort
"PYI", # flake8-pyi
"TRY", # tryceratops
"UP", # pyupgrade
"TRY",
"YTT", # flake8-2020
]
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
5 changes: 1 addition & 4 deletions setuptools/package_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,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 @@ -283,9 +283,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 644c69d

Please sign in to comment.