brn: Introduce BRN as a class

This commit is contained in:
Iain Learmonth 2022-06-15 11:50:15 +01:00
parent 8c411e39bc
commit a0da4d4641
8 changed files with 116 additions and 9 deletions

View file

@ -3,6 +3,7 @@ from datetime import datetime
from typing import Union, List, Optional, Any
from app.alarms import alarms_for
from app.brm.brn import BRN
from app.extensions import db
from app.models.alarms import Alarm
@ -73,7 +74,7 @@ class AbstractResource(db.Model): # type: ignore
@property
@abstractmethod
def brn(self) -> str:
def brn(self) -> BRN:
raise NotImplementedError()
def deprecate(self, *, reason: str) -> None: