mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-04-29 00:24:34 +02:00
WIP: part 4 of module 6
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
def record_spell(spell_name: str, ingredients: str) -> str:
|
||||
from .validator import validate_ingredients
|
||||
|
||||
validation_res = validate_ingredients(ingredients)
|
||||
if validation_res == f"{ingredients} - VALID":
|
||||
return f"Spell recorded: {spell_name} ({validation_res})"
|
||||
else:
|
||||
return f"Spell rejected: {spell_name} ({validation_res})"
|
||||
Reference in New Issue
Block a user