Skip to content

Commit

Permalink
Add __repr__ for {Build,Install}Request.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Jan 12, 2021
1 parent 59614c5 commit b59a33e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pex/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,19 @@ def result(self, dist_root):
# type: (str) -> BuildResult
return BuildResult.from_request(self, dist_root=dist_root)

def __repr__(self):
# type: () -> str
return (
"{class_name}("
"target={target!r}, source_path={source_path!r}, fingerprint={fingerprint!r}"
")"
).format(
class_name=self.__class__.__name__,
target=self.target,
source_path=self.source_path,
fingerprint=self.fingerprint,
)


class BuildResult(object):
@classmethod
Expand Down Expand Up @@ -453,6 +466,19 @@ def result(self, installation_root):
# type: (str) -> InstallResult
return InstallResult.from_request(self, installation_root=installation_root)

def __repr__(self):
# type: () -> str
return (
"{class_name}("
"target={target!r}, wheel_path={wheel_path!r}, fingerprint={fingerprint!r}"
")"
).format(
class_name=self.__class__.__name__,
target=self.target,
wheel_path=self.wheel_path,
fingerprint=self.fingerprint,
)


class InstallResult(object):
@classmethod
Expand Down

0 comments on commit b59a33e

Please sign in to comment.