Skip to content

Commit

Permalink
Mypy test passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Basso committed Aug 9, 2024
1 parent 4e38d9d commit 04bec44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spectrum_fundamentals/mod_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,10 @@ def split_modstring(sequence: str, r_pattern):
f"The element(s) [{not_parsable_elements}] " f"in the sequence [{sequence}] could not be parsed"
)

pattern = r"[A-Z]\[UNIMOD:\d+\]"
unimod_pattern = r"[A-Z]\[UNIMOD:\d+\]"
alphabet_pattern = [re.escape(i) for i in sorted(alphabet, key=len, reverse=True)]

pattern = [pattern] + alphabet_pattern
pattern = [unimod_pattern] + alphabet_pattern
regex_pattern = re.compile("|".join(pattern))
return map(split_modstring, sequences, repeat(regex_pattern))

Expand Down

0 comments on commit 04bec44

Please sign in to comment.