From 1defad72fd7414578179692e73c5222f53042c1f Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Wed, 21 Sep 2022 18:28:58 +0000 Subject: [PATCH] Island: Fix mypy issues in networkmap.py --- monkey/monkey_island/cc/models/networkmap.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/monkey/monkey_island/cc/models/networkmap.py b/monkey/monkey_island/cc/models/networkmap.py index e249a19fc..8a3816e1a 100644 --- a/monkey/monkey_island/cc/models/networkmap.py +++ b/monkey/monkey_island/cc/models/networkmap.py @@ -1,6 +1,14 @@ from dataclasses import dataclass from typing import Mapping, Sequence +from monkey_island.cc.models import Machine + + +@dataclass +class Arc: + dst_machine: Machine # noqa: F821 + status: str + # This is the most concise way to represent a graph: # Machine id as key, Arch list as a value @@ -9,9 +17,3 @@ from typing import Mapping, Sequence @dataclass class NetworkMap: nodes: Mapping[str, Sequence[Arc]] # noqa: F821 - - -@dataclass -class Arc: - dst_machine: Machine # noqa: F821 - status: str