Skip to content

Commit c4e440e

Browse files
use f-string in exception message
1 parent fb0d7e9 commit c4e440e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pip/_internal/req/req_install.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,11 @@ def ensure_pristine_source_checkout(self) -> None:
665665
# version inconsistencies are logged later, but do not fail
666666
# the installation.
667667
raise PreviousBuildDirError(
668-
"pip can't proceed with requirements '{}' due to a "
669-
"pre-existing build directory ({}). This is likely "
668+
f"pip can't proceed with requirements '{self}' due to a "
669+
f"pre-existing build directory ({self.source_dir}). This is likely "
670670
"due to a previous installation that failed . pip is "
671671
"being responsible and not assuming it can delete this. "
672-
"Please delete it and try again.".format(self, self.source_dir)
672+
"Please delete it and try again."
673673
)
674674

675675
# For editable installations

0 commit comments

Comments
 (0)