Skip to content

Commit

Permalink
"just working on formatting..."
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Memphis committed Jan 16, 2024
1 parent 2efa6a8 commit 4b3baf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions memphis/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,26 @@ class MemphisErrors:
"Unsupported message type"
)

def expecting_format(error: Exception, format: str):
def expecting_format(self, error: Exception, format: str):
return MemphisError(f"Expecting {format} format: " + str(error))

def expecting_json(error: Exception):
def expecting_json(self, error: Exception):
pass

def schema_validation_failed(error):
def schema_validation_failed(self, error):
return MemphisSchemaError("Schema validation has failed: " + str(error))

def schema_msg_mismatch(error: Exception):
def schema_msg_mismatch(self, error: Exception):
return MemphisSchemaError(
f"Deserialization has been failed since the message format does not align with the currently attached schema: {str(error)}"
)

def partition_not_in_station(partition_number, station_name):
def partition_not_in_station(self, partition_number, station_name):
return MemphisError(
f"Partition {str(partition_number)} does not exist in station {station_name}"
)

def invalid_schema_type(schema_type):
def invalid_schema_type(self, schema_type):
return MemphisError(
"schema type not supported"
+ schema_type
Expand Down
1 change: 0 additions & 1 deletion memphis/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from memphis.exceptions import (
MemphisConnectError,
MemphisError,
MemphisSchemaError,
MemphisErrors,
)
from memphis.station import Station
Expand Down

0 comments on commit 4b3baf6

Please sign in to comment.