Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def from_json(cls, json_dict: Dict) -> List[MonsterDrop]:
"""Convert the dict under the 'drops' key into actual :class:`MonsterDrop`"""
monster_drops = list()
if json_dict.get("drops"):
for drop in json_dict["drops"]:
monster_drops.append(MonsterDrop(**drop))
json_dict["drops"] = monster_drops
return cls(**json_dict)