lots of typing fixes
This commit is contained in:
parent
51f580a304
commit
3665c34961
43 changed files with 260 additions and 178 deletions
|
@ -1,4 +1,5 @@
|
|||
from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
from app import db
|
||||
from app.models import AbstractConfiguration, AbstractResource
|
||||
|
@ -14,7 +15,7 @@ class BridgeConf(AbstractConfiguration):
|
|||
group = db.relationship("Group", back_populates="bridgeconfs")
|
||||
bridges = db.relationship("Bridge", back_populates="conf")
|
||||
|
||||
def destroy(self):
|
||||
def destroy(self) -> None:
|
||||
self.destroyed = datetime.utcnow()
|
||||
self.updated = datetime.utcnow()
|
||||
for bridge in self.bridges:
|
||||
|
@ -23,7 +24,7 @@ class BridgeConf(AbstractConfiguration):
|
|||
bridge.updated = datetime.utcnow()
|
||||
|
||||
@classmethod
|
||||
def csv_header(cls):
|
||||
def csv_header(cls) -> List[str]:
|
||||
return super().csv_header() + [
|
||||
"group_id", "provider", "method", "description", "number"
|
||||
]
|
||||
|
@ -41,7 +42,7 @@ class Bridge(AbstractResource):
|
|||
alarms = db.relationship("Alarm", back_populates="bridge")
|
||||
|
||||
@classmethod
|
||||
def csv_header(cls):
|
||||
def csv_header(cls) -> List[str]:
|
||||
return super().csv_header() + [
|
||||
"conf_id", "terraform_updated", "nickname", "fingerprint", "hashed_fingerprint", "bridgeline"
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue