[misc] Add some type annotations

This commit is contained in:
Thomas Lindner 2023-03-18 18:42:59 +01:00
parent 35eff0c416
commit fd09b381a6
2 changed files with 5 additions and 4 deletions

View file

@ -53,11 +53,12 @@ deps =
black
flake8
mypy
types-requests
commands =
black -S --check --diff src tests
flake8 src tests
# not yet
#mypy src tests
#mypy --ignore-missing-imports src tests
[testenv]
deps =

View file

@ -1,4 +1,4 @@
# Copyright (C) 2020 by Thomas Lindner <tom@dl6tom.de>
# Copyright (C) 2020, 2023 by Thomas Lindner <tom@dl6tom.de>
# Copyright (C) 2020 by Cathy Hu <cathy.hu@fau.de>
# Copyright (C) 2020 by Martin Rey <martin.rey@mailbox.org>
#
@ -71,7 +71,7 @@ class Censor:
hood (Hood): A Hood Model object
"""
__instances = {}
__instances: dict[int, list["Censor"]] = {}
def __init__(self, hood):
self.hood = hood
@ -177,7 +177,7 @@ class Spawner:
BotClass (Censor subclass): A Bot Class object
"""
__instances = []
__instances: list["Spawner"] = []
def __init__(self, ORMClass, BotClass):
self.ORMClass = ORMClass