inventorymgr/service/users.py
def read_user(user_id: int) -> User:
    """Read a specified user from the DB."""
    user = User.query.get(user_id)
    if user is None:
        raise api.APIError(reason="no_such_user", status_code=400)
    return cast(User, user)
Read a specified user from the DB.
Read a specified user from the DB.
Read a specified user from the DB .
def read_user(user_id: int) -> User:
    user = User.query.get(user_id)
    if user is None:
        raise api.APIError(reason="no_such_user", status_code=400)
    return cast(User, user)
def read_user ( user_id : int ) -> User : user = User . query . get ( user_id ) if user is None : raise api . APIError ( reason = "no_such_user" , status_code = 400 ) return cast ( User , user )
Read a specified user from the DB.
Read a specified user from the DB .
"""Read a specified user from the DB."""
user_id
int