File size: 212 Bytes
899a7c7
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from validators import is_non_empty


STOCK = {"widget": 4, "gizmo": 0}


def is_available(item_name: str) -> bool:
    if not is_non_empty(item_name):
        return False
    return STOCK.get(item_name, 0) > 0