add black to python CI (#178)

Closes #48
This commit is contained in:
Tevin Wang
2023-06-12 11:22:34 -07:00
committed by GitHub
parent 7bad676f30
commit 9b83ce3d2a
13 changed files with 86 additions and 51 deletions

View File

@@ -1,16 +1,22 @@
"""Custom exception handling"""
class MissingValueError(ValueError):
"""Exception raised when a required value is missing."""
pass
class MissingColumnError(KeyError):
"""
Exception raised when a column name specified is not in
Exception raised when a column name specified is not in
the DataFrame object
"""
def __init__(self, column_name):
self.column_name = column_name
def __str__(self):
return f"Error: Column '{self.column_name}' does not exist in the DataFrame object"
return (
f"Error: Column '{self.column_name}' does not exist in the DataFrame object"
)