From 557caeaac4ec6ec155a8928689b60263b3440579 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Tue, 1 Aug 2023 08:19:28 +0100 Subject: [PATCH] #1715 - Added suppress-none-returning and suppress-dummy-args to .flake8 as flake8-annotations can get very annoying --- .flake8 | 2 ++ src/primaite/simulator/network/physical_layer.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.flake8 b/.flake8 index 6e653102..1f3c7065 100644 --- a/.flake8 +++ b/.flake8 @@ -14,3 +14,5 @@ extend-ignore = exclude = docs/source/* tests/* +suppress-none-returning=True +suppress-dummy-args=True diff --git a/src/primaite/simulator/network/physical_layer.py b/src/primaite/simulator/network/physical_layer.py index 2bc5c2b8..ebc0c788 100644 --- a/src/primaite/simulator/network/physical_layer.py +++ b/src/primaite/simulator/network/physical_layer.py @@ -156,7 +156,7 @@ class NIC(SimComponent): """ pass - def send_frame(self, frame): + def send_frame(self, frame: Any): """ Send a network frame from the NIC to the connected link. @@ -165,7 +165,7 @@ class NIC(SimComponent): """ pass - def receive_frame(self, frame): + def receive_frame(self, frame: Any): """ Receive a network frame from the connected link. @@ -228,7 +228,7 @@ class Link(SimComponent): self.endpoint_a.connect_link(self) self.endpoint_b.connect_link(self) - def send_frame(self, sender_nic: NIC, frame): + def send_frame(self, sender_nic: NIC, frame: Any): """ Send a network frame from one NIC to another connected NIC. @@ -239,7 +239,7 @@ class Link(SimComponent): """ pass - def receive_frame(self, sender_nic: NIC, frame): + def receive_frame(self, sender_nic: NIC, frame: Any): """ Receive a network frame from a connected NIC.