Skip to content

Commit

Permalink
topotato: crowbar fix typing re. CallableNS
Browse files Browse the repository at this point in the history
Need to find a better way to do this, but let's get pylint and mypy
clean for the time being.

Signed-off-by: David Lamparter <[email protected]>
  • Loading branch information
eqvinox committed Sep 17, 2024
1 parent 8663a5e commit 7f3ed7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions topotato/frr/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from typing import (
cast,
Any,
Callable,
ClassVar,
Collection,
Dict,
Expand Down Expand Up @@ -56,7 +57,6 @@ def deprecated(fn): # type: ignore
)
from ..pcapng import Context
from ..network import TopotatoNetwork
from ..topobase import CallableNS
from ..control import TargetSection
from .exceptions import FRRStartupVtyshConfigFail

Expand Down Expand Up @@ -473,7 +473,7 @@ def __str__(self):


# pylint: disable=too-many-ancestors,too-many-instance-attributes
class FRRRouterNS(TopotatoNetwork.RouterNS, CallableNS):
class FRRRouterNS(TopotatoNetwork.RouterNS):
"""
Add a bunch of FRR daemons on top of an (OS-dependent) RouterNS
"""
Expand All @@ -490,6 +490,10 @@ class FRRRouterNS(TopotatoNetwork.RouterNS, CallableNS):
frrconfpath: str
merged_cfg: str

# hack to fix CallableNS foo... really needs some improvement
check_call: Callable[..., None]
popen: Callable[..., "subprocess.Popen"]

def __init__(
self,
instance: TopotatoNetwork,
Expand Down

0 comments on commit 7f3ed7b

Please sign in to comment.