From 1e72e1c68a708518526b8e090f5d6482671cbd57 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Fri, 3 Mar 2023 11:30:27 -0600 Subject: op-mode: T5051: use typing.Literal in op-mode scripts --- src/op_mode/bgp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/op_mode/bgp.py') diff --git a/src/op_mode/bgp.py b/src/op_mode/bgp.py index 23001a9d7..3f6d45dd7 100755 --- a/src/op_mode/bgp.py +++ b/src/op_mode/bgp.py @@ -30,6 +30,7 @@ from vyos.configquery import ConfigTreeQuery import vyos.opmode +ArgFamily = typing.Literal['inet', 'inet6'] frr_command_template = Template(""" {% if family %} @@ -75,7 +76,7 @@ def _verify(func): @_verify def show_neighbors(raw: bool, - family: str, + family: ArgFamily, peer: typing.Optional[str], vrf: typing.Optional[str]): kwargs = dict(locals()) -- cgit v1.2.3