1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

fix model type annotations to make flake8 happy

This commit is contained in:
checktheroads
2020-07-13 02:18:26 -07:00
parent 10593de581
commit 8b02787aea
9 changed files with 43 additions and 20 deletions

View File

@@ -12,6 +12,8 @@ from hyperglass.models import HyperglassModel
from hyperglass.configuration import params
from hyperglass.external.rpki import rpki_state
WinningWeight = constr(regex=r"(low|high)")
class ParsedRouteEntry(HyperglassModel):
"""Per-Route Response Model."""
@@ -94,4 +96,4 @@ class ParsedRoutes(HyperglassModel):
vrf: StrictStr
count: StrictInt = 0
routes: List[ParsedRouteEntry]
winning_weight: constr(regex=r"(low|high)")
winning_weight: WinningWeight