Skip to content

Commit

Permalink
Add missing types of parameter (#20)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick ZAJDA <[email protected]>
  • Loading branch information
Nardol authored Nov 22, 2022
1 parent 67838c7 commit 18e0727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pysmsboxnet/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
class Client:
"""API client class."""

def __init__(self, session: ClientSession, host: str, cleApi: str, timeout=30):
def __init__(
self, session: ClientSession, host: str, cleApi: str, timeout: int = 30
):
"""Initialize the SMS."""
self.host = host
self.cleApi = cleApi
Expand Down
4 changes: 2 additions & 2 deletions pysmsboxnet/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class SMSBoxException(BaseException):
"""Base exception for SMSBox API."""

def __init__(self, message="Unknown API error"):
def __init__(self, message: str = "Unknown API error"):
"""Initialize SMSBox base exception.
An optional message can be specified.
Expand Down Expand Up @@ -58,6 +58,6 @@ def __init__(self):
class HTTPException(SMSBoxException):
"""Exception when API returns ERROR 03."""

def __init__(self, errorCode):
def __init__(self, errorCode: int):
"""Initialize HTTP error Exception."""
super().__init__(f"HTTP error ({errorCode})")

0 comments on commit 18e0727

Please sign in to comment.