diff --git a/ruff.toml b/ruff.toml index b55b4e8067..53d644f6a5 100644 --- a/ruff.toml +++ b/ruff.toml @@ -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 diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9e01d5e082..9b3769fac9 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -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() diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 6e8d0c68c3..12d6b30a8b 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -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),