diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 91f23ddafc2..a7eaee30930 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -22,7 +22,7 @@ import sys -if sys.version_info < (3, 8): +if sys.version_info < (3, 8): # noqa: UP036 raise RuntimeError("Python 3.8 or later is required") import os @@ -2858,7 +2858,7 @@ def version(self): version = self._get_version() if version is None: path = self._get_metadata_path_for_display(self.PKG_INFO) - msg = f"Missing 'Version:' header and/or {self.PKG_INFO} file at path: {path}" + msg = (f"Missing 'Version:' header and/or {self.PKG_INFO} file at path: {path}") raise ValueError(msg, self) from e return version @@ -2912,7 +2912,9 @@ def requires(self, extras: Iterable[str] = ()): try: deps.extend(dm[safe_extra(ext)]) except KeyError as e: - raise UnknownExtra(f"{self} has no such extra feature {ext!r}") from e + raise UnknownExtra( + f"{self} has no such extra feature {ext!r}" + ) from e return deps def _get_metadata_path_for_display(self, name): diff --git a/ruff.toml b/ruff.toml index 730b964a78f..eb33837e6c2 100644 --- a/ruff.toml +++ b/ruff.toml @@ -26,7 +26,6 @@ ignore = [ ] extend-ignore = [ "UP015", # redundant-open-modes, explicit is preferred - "UP036", # temporarily disabled ] exclude = [ "**/_vendor",