Skip to content

Commit ace1a2c

Browse files
Use f-strings instead of repr()
1 parent 3250c25 commit ace1a2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg_resources/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ class ResolutionError(Exception):
299299
"""Abstract base for dependency resolution errors"""
300300

301301
def __repr__(self) -> str:
302-
return self.__class__.__name__ + repr(self.args)
302+
return f"{self.__class__.__name__}{self.args!r}"
303303

304304

305305
class VersionConflict(ResolutionError):
@@ -3325,7 +3325,7 @@ def has_version(self) -> bool:
33253325
try:
33263326
self.version
33273327
except ValueError:
3328-
issue_warning("Unbuilt egg for " + repr(self))
3328+
issue_warning(f"Unbuilt egg for {self!r}")
33293329
return False
33303330
except SystemError:
33313331
# TODO: remove this except clause when python/cpython#103632 is fixed.

0 commit comments

Comments
 (0)