Skip to content

Commit 1718850

Browse files
committed
Rename __add__ method to append for clarity in Cigar class
1 parent bdd6ff9 commit 1718850

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/aligntools/cigar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def normalize(cigar_lst: Iterable[Tuple[int, CigarActions]]) \
410410
def __eq__(self, other: object) -> bool:
411411
return isinstance(other, Cigar) and self._data == other._data
412412

413-
def __add__(self, other: 'Cigar') -> 'Cigar':
413+
def append(self, other: 'Cigar') -> 'Cigar':
414414
return Cigar(self._data + other._data)
415415

416416
def __repr__(self):

src/aligntools/cigar_hit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def __add__(self, other: 'CigarHit') -> 'CigarHit':
208208
left = other
209209
right = self
210210

211-
combined_cigar = left.cigar + right.cigar
211+
combined_cigar = left.cigar.append(right.cigar)
212212
return CigarHit(cigar=combined_cigar,
213213
r_st=left.r_st,
214214
r_ei=left.r_st + combined_cigar.ref_length - 1,

0 commit comments

Comments
 (0)