Skip to content

Commit

Permalink
Techdebt: MyPy ECS (#5944)
Browse files Browse the repository at this point in the history
  • Loading branch information
bblommers authored Feb 19, 2023
1 parent 1c85116 commit efb13a1
Show file tree
Hide file tree
Showing 5 changed files with 496 additions and 412 deletions.
16 changes: 8 additions & 8 deletions moto/ecs/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class ServiceNotFoundException(RESTError):
code = 400

def __init__(self):
def __init__(self) -> None:
super().__init__(
error_type="ServiceNotFoundException", message="Service not found."
)
Expand All @@ -13,7 +13,7 @@ def __init__(self):
class TaskDefinitionNotFoundException(JsonRESTError):
code = 400

def __init__(self):
def __init__(self) -> None:
super().__init__(
error_type="ClientException",
message="Unable to describe task definition.",
Expand All @@ -23,14 +23,14 @@ def __init__(self):
class RevisionNotFoundException(JsonRESTError):
code = 400

def __init__(self):
def __init__(self) -> None:
super().__init__(error_type="ClientException", message="Revision is missing.")


class TaskSetNotFoundException(JsonRESTError):
code = 400

def __init__(self):
def __init__(self) -> None:
super().__init__(
error_type="ClientException",
message="The specified task set does not exist.",
Expand All @@ -40,7 +40,7 @@ def __init__(self):
class ClusterNotFoundException(JsonRESTError):
code = 400

def __init__(self):
def __init__(self) -> None:
super().__init__(
error_type="ClusterNotFoundException", message="Cluster not found."
)
Expand All @@ -49,19 +49,19 @@ def __init__(self):
class EcsClientException(JsonRESTError):
code = 400

def __init__(self, message):
def __init__(self, message: str):
super().__init__(error_type="ClientException", message=message)


class InvalidParameterException(JsonRESTError):
code = 400

def __init__(self, message):
def __init__(self, message: str):
super().__init__(error_type="InvalidParameterException", message=message)


class UnknownAccountSettingException(InvalidParameterException):
def __init__(self):
def __init__(self) -> None:
super().__init__(
"unknown should be one of [serviceLongArnFormat,taskLongArnFormat,containerInstanceLongArnFormat,containerLongArnFormat,awsvpcTrunking,containerInsights,dualStackIPv6]"
)
Loading

0 comments on commit efb13a1

Please sign in to comment.