Task Description: Implement a Simple Inventory Management System
You need to implement a class called Inventory in the /app/ directory that manages a collection of items. The functionality should include adding, removing, and listing items. The following requirements must be met to ensure all tests pass:
Class Definition:
Create a class named Inventory.
Add Item:
Implement a method add_item(name: str, quantity: int) -> None that adds an item to the inventory.
If the item already exists, increase its quantity by the specified amount.
Raise a ValueError if the quantity is less than 1.
Remove Item:
Implement a method remove_item(name: str, quantity: int) -> None that removes a specified quantity of an item from the inventory.
If the item does not exist, raise a KeyError.
If the quantity to remove is greater than the current quantity, raise a ValueError.
If the removal results in the item's quantity reaching zero, remove the item from the inventory.
List Items:
Implement a method list_items() -> List[Tuple[str, int]] that returns a list of tuples, each containing the item name and its quantity, sorted by item name in ascending order.
Data Structure:
Use a dictionary to store the items, where keys are item names and values are their respective quantities.
Ensure that your implementation adheres to the specified requirements, and all methods function as expected to satisfy the associated test cases.