Skip to content

Commit

Permalink
#338 clarified an optional way
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Jun 17, 2022
1 parent 7f91089 commit 6ecc408
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arekit/common/text_opinions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def __init__(self, doc_id, text_opinion_id, source_id, target_id, owner, label):
def create_copy(cls, other, keep_text_opinion_id=True):
assert(isinstance(other, TextOpinion))
assert(isinstance(keep_text_opinion_id, bool))
return TextOpinion.__try_create_copy_core(other=other, keep_text_opinion_id=keep_text_opinion_id)
return cls.__try_create_copy_core(other=other, keep_text_opinion_id=keep_text_opinion_id)

@classmethod
def convert(cls, other, convert_func):
@staticmethod
def try_convert(other, convert_func):
""" Creates a copy of `other` opinion with different id of opinion participants.
Use cases: required for BaseParsedNewsServiceProvider, when we decided to bring the outside
opinion into one which is based on DocumentEntities.
Expand Down

0 comments on commit 6ecc408

Please sign in to comment.