Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
lwestenberg committed Feb 23, 2022
1 parent 96d93c3 commit 26eea90
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.1",
"version": "0.2.0",
"configurations": [
{
"name": "Pytest",
Expand Down
6 changes: 3 additions & 3 deletions bold_smart_lock/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def authenticate(
elif response.status == 404:
raise VerificationNotFound
elif response.content_type == "application/json":
response_json: dict[str, str] = await response.json()
response_json = await response.json()
if "token" in response_json:
self.set_token(response_json["token"])
return response_json
Expand All @@ -73,7 +73,7 @@ async def re_login(self):
headers=self.headers(),
raise_for_status=False
) as response:
response_json: dict[str, str] = await response.json()
response_json = await response.json()

if "token" in response_json:
self.set_token(response_json["token"])
Expand All @@ -98,7 +98,7 @@ async def request_validation_id(self, email: str = None, phone: str = None):
raise_for_status=False
) as response:
if response.content_type == "application/json":
response_json: dict[str, str] = await response.json()
response_json = await response.json()
if "errorCode" in response_json:
if response_json["errorCode"] == INVALID_EMAIL_ERROR:
raise InvalidEmail
Expand Down
4 changes: 2 additions & 2 deletions bold_smart_lock/bold_smart_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def get_device_permissions(self):
async with self._session.get(
API_URI + EFFECTIVE_DEVICE_PERMISSIONS_ENDPOINT, headers=headers, raise_for_status=True
) as response:
response_json: dict[str, str] = await response.json()
response_json = await response.json()
return response_json
except Exception as exception:
raise exception
Expand All @@ -53,7 +53,7 @@ async def remote_activation(self, device_id: int):
async with self._session.post(
API_URI + REMOTE_ACTIVATION_ENDPOINT.format(device_id), headers=headers, raise_for_status=True
) as response:
response_json: dict[str, str] = await response.json()
response_json = await response.json()
return response_json
except Exception as exception:
raise exception
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Python Bold Smart Lock setup script."""
from setuptools import setup

_VERSION = "0.2.1"
_VERSION = "0.2.2"


def readme():
Expand Down

0 comments on commit 26eea90

Please sign in to comment.