Skip to content

Commit ed148be

Browse files
typing for actions
1 parent a873bb7 commit ed148be

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/peptacular/chem/chem_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Union, Optional
1+
from typing import Union, Optional, List
22

33
from peptacular.constants import HILL_ORDER, ISOTOPIC_ATOMIC_MASSES, ELECTRON_MASS, PROTON_MASS, \
44
NEUTRON_MASS, AVERAGE_ATOMIC_MASSES, ISOTOPE_COMPONENT_PATTERN, CONDENSED_CHEM_FORMULA_PATTERN
@@ -229,7 +229,7 @@ def chem_mass(formula: Union[ChemComposition, str],
229229

230230

231231

232-
def _split_chem_formula(formula: str) -> list[str]:
232+
def _split_chem_formula(formula: str) -> List[str]:
233233
"""
234234
Splits a chemical formula into its components. The formula is assumed to be proForma2.0 compliant, wherase the
235235
isotope notation for an element and its count is enclosed in square brackets and the formula contains no
@@ -239,7 +239,7 @@ def _split_chem_formula(formula: str) -> list[str]:
239239
:type formula: str
240240
241241
:return: The components of the chemical formula, split by instances of the isotope notation.
242-
:rtype: list[str]
242+
:rtype: List[str]
243243
244244
.. code-block:: python
245245

src/peptacular/sequence/mod_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Dict, List, Generator, Union, Optional, TypeAlias, Literal
1+
from typing import Dict, List, Generator, Union, Optional, Literal
22

33
from peptacular.sequence.sequence_funcs import sequence_to_annotation
44
from peptacular.proforma.proforma_parser import ProFormaAnnotation
@@ -7,10 +7,10 @@
77
from peptacular.proforma.input_convert import fix_list_of_list_of_mods, fix_list_of_mods, ModIndex, ModValue, \
88
remove_empty_list_of_list_of_mods
99

10-
ModMode: TypeAlias = Literal['skip', 'append', 'overwrite']
10+
ModMode = Literal['skip', 'append', 'overwrite']
1111
MOD_MODE_VALUES = ['skip', 'append', 'overwrite']
1212

13-
ModBuilderReturnType: TypeAlias = Literal["str", "annotation"]
13+
ModBuilderReturnType = Literal["str", "annotation"]
1414
MOD_BUILDER_RETURN_TYPE_VALUES = ['str', 'annotation']
1515

1616
STATIC_MOD_INPUT = Union[List[ModValue], ModValue]

0 commit comments

Comments
 (0)