use f-string in exception message

This commit is contained in:
Danny McClanahan 2023-08-14 07:55:55 -04:00
parent bfa8a5532d
commit 39da6e051a
No known key found for this signature in database
GPG Key ID: CE8D0DA71DEFC1DF
1 changed files with 3 additions and 3 deletions

View File

@ -665,11 +665,11 @@ class InstallRequirement:
# version inconsistencies are logged later, but do not fail
# the installation.
raise PreviousBuildDirError(
"pip can't proceed with requirements '{}' due to a "
"pre-existing build directory ({}). This is likely "
f"pip can't proceed with requirements '{self}' due to a "
f"pre-existing build directory ({self.source_dir}). This is likely "
"due to a previous installation that failed . pip is "
"being responsible and not assuming it can delete this. "
"Please delete it and try again.".format(self, self.source_dir)
"Please delete it and try again."
)
# For editable installations