ci: Add mypy as a dev dependency and configure it

This commit is contained in:
2023-10-30 05:47:28 +01:00
parent 95039914ba
commit 4996931b54
14 changed files with 350 additions and 145 deletions

View File

@@ -13,7 +13,7 @@ with open(os.path.expanduser("~/.ssb/secret"), encoding="utf-8") as f:
config = yaml.safe_load(f)
async def main():
async def main() -> None:
"""Main function to run"""
server_pub_key = b64decode(config["public"][:-8])

View File

@@ -8,17 +8,18 @@ from nacl.signing import SigningKey
import yaml
from secret_handshake import SHSServer
from secret_handshake.network import SHSDuplexStream
with open(os.path.expanduser("~/.ssb/secret"), encoding="utf-8") as f:
config = yaml.safe_load(f)
async def _on_connect(conn):
async def _on_connect(conn: SHSDuplexStream) -> None:
async for msg in conn:
print(msg)
async def main():
async def main() -> None:
"""Main function to run"""
server_keypair = SigningKey(b64decode(config["private"][:-8])[:32])