[misc] Add some type annotations
This commit is contained in:
parent
35eff0c416
commit
fd09b381a6
|
@ -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 =
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue