Remove unnecessary raise statement (#1778)

* Fix typo

* Remove unnecessary raise statement
This commit is contained in:
YishiMichael 2022-04-05 22:22:59 +08:00 committed by GitHub
parent b764791258
commit f9d8a76767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,8 +146,6 @@ class LabelledString(_StringSVG):
def take_nearest_value(seq: list[int], val: int, index_shift: int) -> int:
sorted_seq = sorted(seq)
index = LabelledString.find_region_index(sorted_seq, val)
if index == -1:
raise IndexError
return sorted_seq[index + index_shift]
@staticmethod