@@ -105,17 +105,13 @@ def match(k):
105105 return loot
106106
107107
108- def parse_abilities (value ) :
108+ def parse_abilities (value : str ) -> list [ dict [ str , str ]] :
109109 """Parse the abilities of a creature.
110110
111- Parameters
112- ----------
113- value: :class:`str`
114- A string containing the creature's abilities definition.
111+ Args:
112+ value: A string containing the creature's abilities definition.
115113
116- Returns
117- -------
118- :class:`list` of :class:`dict`
114+ Returns:
119115 A list of dictionaries with the ability data.
120116
121117 """
@@ -173,26 +169,21 @@ def parse_abilities(value):
173169 return abilities
174170
175171
176- def parse_monster_walks (value ) :
172+ def parse_monster_walks (value : str ) -> str | None :
177173 """Match the values against a regex to filter typos or bad data on the wiki.
178174
179175 Element names followed by any character that is not a comma will be considered unknown and will not be returned.
180176
181- Examples
182- --------
177+ Examples:
183178 - ``Poison?, fire`` will return ``fire``.
184- - ``Poison?, fire.`` will return neither.
179+ - ``Poison?, fire? .`` will return neither.
185180 - ``Poison, earth, fire?, [[ice]]`` will return ``poison,earth``.
186181 - ``No``, ``--``, ``>``, or ``None`` will return ``None``.
187182
188- Parameters
189- ----------
190- value: :class:`str`
191- The string containing possible field types.
183+ Args:
184+ value: The string containing possible field types.
192185
193- Returns
194- -------
195- :class:`str`, optional
186+ Returns:
196187 A list of field types, separated by commas.
197188
198189 """
0 commit comments