[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 black
flake8 flake8
mypy mypy
types-requests
commands = commands =
black -S --check --diff src tests black -S --check --diff src tests
flake8 src tests flake8 src tests
# not yet # not yet
#mypy src tests #mypy --ignore-missing-imports src tests
[testenv] [testenv]
deps = 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 Cathy Hu <cathy.hu@fau.de>
# Copyright (C) 2020 by Martin Rey <martin.rey@mailbox.org> # Copyright (C) 2020 by Martin Rey <martin.rey@mailbox.org>
# #
@ -71,7 +71,7 @@ class Censor:
hood (Hood): A Hood Model object hood (Hood): A Hood Model object
""" """
__instances = {} __instances: dict[int, list["Censor"]] = {}
def __init__(self, hood): def __init__(self, hood):
self.hood = hood self.hood = hood
@ -177,7 +177,7 @@ class Spawner:
BotClass (Censor subclass): A Bot Class object BotClass (Censor subclass): A Bot Class object
""" """
__instances = [] __instances: list["Spawner"] = []
def __init__(self, ORMClass, BotClass): def __init__(self, ORMClass, BotClass):
self.ORMClass = ORMClass self.ORMClass = ORMClass