overall: add types hints to the small subset used by avatar

This commit is contained in:
uael
2023-02-02 17:36:23 +00:00
parent ed261886e1
commit b731f6f556
13 changed files with 234 additions and 166 deletions

View File

@@ -24,6 +24,7 @@ import asyncio
import logging
import os
import json
from typing import Optional
from colors import color
from .hci import Address
@@ -242,7 +243,7 @@ class JsonKeyStore(KeyStore):
# Atomically replace the previous file
os.rename(temp_filename, self.filename)
async def delete(self, name):
async def delete(self, name: str) -> None:
db = await self.load()
namespace = db.get(self.namespace)
@@ -278,7 +279,7 @@ class JsonKeyStore(KeyStore):
await self.save(db)
async def get(self, name):
async def get(self, name: str) -> Optional[PairingKeys]:
db = await self.load()
namespace = db.get(self.namespace)