From 722a498eab071591f27129a4366925b363570801 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Thu, 19 May 2022 08:24:47 +0900 Subject: [PATCH] Apply black --- backend/labels/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/labels/models.py b/backend/labels/models.py index e5336d56..0c05f176 100644 --- a/backend/labels/models.py +++ b/backend/labels/models.py @@ -46,7 +46,7 @@ class Span(Label): end_offset = models.IntegerField() def __str__(self): - text = self.example.text[self.start_offset:self.end_offset] + text = self.example.text[self.start_offset : self.end_offset] return f"({text}, {self.start_offset}, {self.end_offset}, {self.label.text})" def validate_unique(self, exclude=None): @@ -112,8 +112,8 @@ class Relation(Label): def __str__(self): text = self.example.text - from_span = text[self.from_id.start_offset: self.from_id.end_offset] - to_span = text[self.to_id.start_offset: self.to_id.end_offset] + from_span = text[self.from_id.start_offset : self.from_id.end_offset] + to_span = text[self.to_id.start_offset : self.to_id.end_offset] type_text = self.type.text return f"{from_span} - ({type_text}) -> {to_span}"