from typing import Optional


class UnavailableProductStock(Exception):

    def __init__(
        self,               # type: UnavailableProductStock
        part_code,          # type: int
        part_name=None,     # type: Optional[str]
    ):
        # type: (...) -> None
        super(UnavailableProductStock, self).__init__(part_code)

        self.part_code = part_code
        self.part_name = part_name
