Skip to content

Commit e55ab26

Browse files
committed
type annotations
1 parent ba5f235 commit e55ab26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_fakerequests.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import json
2525

2626
try:
27-
from typing import Any
27+
from typing import Any, Optional
2828
except ImportError:
2929
pass
3030

@@ -40,7 +40,9 @@ class Fake_Requests:
4040
:param int status_code: Status code to use to the faked response.
4141
"""
4242

43-
def __init__(self, filename: str, headers=None, status_code=200) -> None:
43+
def __init__(
44+
self, filename: str, headers: Optional[dict] = None, status_code: int = 200
45+
) -> None:
4446
self._filename = filename
4547
if headers is None:
4648
self.headers = {"content-type": "application/json"}

0 commit comments

Comments
 (0)