@@ -92,7 +92,7 @@ def __repr__(self):
9292
9393 def __iadd__ (self , other : Any ):
9494 if not isinstance (other , self .__class__ ):
95- raise ValueError ("Cannot compare" )
95+ raise TypeError ("Cannot compare" )
9696 if (
9797 self .max_error_rate != other .max_error_rate
9898 or self .sequence != other .sequence
@@ -172,7 +172,7 @@ def __repr__(self):
172172
173173 def __iadd__ (self , other : "SingleAdapterStatistics" ):
174174 if not isinstance (other , self .__class__ ):
175- raise ValueError ("Cannot iadd" )
175+ raise TypeError ("Cannot iadd" )
176176 self .end += other .end
177177 self .reverse_complemented += other .reverse_complemented
178178 return self
@@ -221,7 +221,7 @@ def __repr__(self):
221221
222222 def __iadd__ (self , other : "LinkedAdapterStatistics" ):
223223 if not isinstance (other , self .__class__ ):
224- raise ValueError ("Cannot iadd" )
224+ raise TypeError ("Cannot iadd" )
225225 self .front += other .front
226226 self .back += other .back
227227 self .reverse_complemented += other .reverse_complemented
@@ -264,7 +264,7 @@ def __repr__(self):
264264
265265 def __iadd__ (self , other : "AnywhereAdapterStatistics" ):
266266 if not isinstance (other , AnywhereAdapterStatistics ):
267- raise ValueError ("Cannot add" )
267+ raise TypeError ("Cannot add" )
268268 self .front += other .front
269269 self .back += other .back
270270 self .reverse_complemented += other .reverse_complemented
@@ -490,7 +490,7 @@ def removed_sequence_length(self) -> int:
490490 return len (self .sequence ) - self .rstart
491491
492492
493- def _generate_adapter_name (_start = [1 ]) -> str :
493+ def _generate_adapter_name (_start = [1 ]) -> str : # noqa: B006
494494 name = str (_start [0 ])
495495 _start [0 ] += 1
496496 return name
@@ -1415,7 +1415,7 @@ def _make_index(self) -> tuple[list[int], "AdapterIndexDict", int]:
14151415 if adapter .indels :
14161416 for s , errors , matches in edit_environment (sequence , k ):
14171417 if s in index :
1418- other_adapter , other_errors , other_matches = index [s ]
1418+ other_adapter , _other_errors , other_matches = index [s ]
14191419 if matches < other_matches :
14201420 continue
14211421 if other_matches == matches and s not in ambiguous :
@@ -1428,7 +1428,7 @@ def _make_index(self) -> tuple[list[int], "AdapterIndexDict", int]:
14281428 matches = n - errors
14291429 for s in hamming_sphere (sequence , errors ):
14301430 if s in index :
1431- other_adapter , other_errors , other_matches = index [s ]
1431+ other_adapter , _other_errors , other_matches = index [s ]
14321432 if matches < other_matches :
14331433 continue
14341434 if other_matches == matches and s not in ambiguous :
0 commit comments