Skip to content

Commit 18e0727

Browse files
authored
Add missing types of parameter (#20)
Signed-off-by: Patrick ZAJDA <[email protected]>
1 parent 67838c7 commit 18e0727

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pysmsboxnet/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
class Client:
1313
"""API client class."""
1414

15-
def __init__(self, session: ClientSession, host: str, cleApi: str, timeout=30):
15+
def __init__(
16+
self, session: ClientSession, host: str, cleApi: str, timeout: int = 30
17+
):
1618
"""Initialize the SMS."""
1719
self.host = host
1820
self.cleApi = cleApi

pysmsboxnet/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class SMSBoxException(BaseException):
55
"""Base exception for SMSBox API."""
66

7-
def __init__(self, message="Unknown API error"):
7+
def __init__(self, message: str = "Unknown API error"):
88
"""Initialize SMSBox base exception.
99
1010
An optional message can be specified.
@@ -58,6 +58,6 @@ def __init__(self):
5858
class HTTPException(SMSBoxException):
5959
"""Exception when API returns ERROR 03."""
6060

61-
def __init__(self, errorCode):
61+
def __init__(self, errorCode: int):
6262
"""Initialize HTTP error Exception."""
6363
super().__init__(f"HTTP error ({errorCode})")

0 commit comments

Comments
 (0)