lots of typing fixes

This commit is contained in:
Iain Learmonth 2022-05-16 11:44:03 +01:00
parent 51f580a304
commit 3665c34961
43 changed files with 260 additions and 178 deletions

View file

@ -7,7 +7,7 @@ from app.models import AbstractConfiguration
from app.extensions import db
class Activity(db.Model):
class Activity(db.Model): # type: ignore
id = db.Column(db.Integer(), primary_key=True)
group_id = db.Column(db.Integer(), nullable=True)
activity_type = db.Column(db.String(20), nullable=False)
@ -49,7 +49,7 @@ class Webhook(AbstractConfiguration):
format = db.Column(db.String(20))
url = db.Column(db.String(255))
def send(self, text: str):
def send(self, text: str) -> None:
if self.format == "telegram":
data = {"text": text}
else: