Add file docstrings to every .py file, improved exception docstrings, helper func typehint

This commit is contained in:
Xevion
2021-01-24 23:30:09 -06:00
parent 58884a43ff
commit c9fad55ade
10 changed files with 73 additions and 11 deletions

View File

@@ -1,22 +1,35 @@
"""
exceptions.py
Stores exceptions in a single file for the rest of the project to use.
"""
class UnbelievableException(BaseException):
"""Base project-wide exception"""
pass
class BlackjackException(UnbelievableException):
"""Blackjack related exceptions inherit from this"""
pass
class NoAceValue(BlackjackException):
"""The card was an ace and the program tried to acquire it's value - this should have been handled differently."""
pass
class IndetermineValue(BlackjackException):
class IndeterminateValue(BlackjackException):
"""The card's value could not be determined (likely a invalid card, or case sensitivity was ignored)."""
pass
class InvalidCard(BlackjackException):
"""The card was fundamentally impossible in it's identifier."""
pass
class CooldownRequired(UnbelievableException):
"""The program tried to activate/use a cooldown before it had ended."""
pass