From b06f47b7f2a4fdadefb064e23d639947f01c0668 Mon Sep 17 00:00:00 2001 From: Miltos Allamanis Date: Mon, 18 May 2020 10:59:18 +0100 Subject: [PATCH] Add __repr__ --- entrypoint.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/entrypoint.py b/entrypoint.py index 9458b4c..dc71124 100644 --- a/entrypoint.py +++ b/entrypoint.py @@ -41,6 +41,13 @@ def __init__( self.annotation_lineno = annotation_lineno self.is_disagreement = is_disagreement + def __repr__(self) -> str: + return ( + f"Suggestion@{self.file_location}:{self.file_location} " + f"Symbol Name: `{self.name}` Suggestion `{self.suggestion}` " + f"Confidence: {self.confidence:.2%}" + ) + assert ( os.environ["GITHUB_EVENT_NAME"] == "pull_request"