Ran pre-commit hook on all files and performed changes to fix flake8 failures

This commit is contained in:
Chris McCarthy
2023-05-25 11:42:19 +01:00
parent aa8284897a
commit 4eb1658966
42 changed files with 1371 additions and 1170 deletions

View File

@@ -1,59 +1,47 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""
The protocol class
"""
"""The protocol class."""
class Protocol(object):
"""
Protocol class
"""
"""Protocol class."""
def __init__(self, _name):
"""
Init
Init.
Args:
_name: The protocol name
"""
self.name = _name
self.load = 0 # bps
self.load = 0 # bps
def get_name(self):
"""
Gets the protocol name
Gets the protocol name.
Returns:
The protocol name
"""
return self.name
def get_load(self):
"""
Gets the protocol load
Gets the protocol load.
Returns:
The protocol load (bps)
"""
return self.load
def add_load(self, _load):
"""
Adds load to the protocol
Adds load to the protocol.
Args:
_load: The load to add
"""
self.load += _load
def clear_load(self):
"""
Clears the load on this protocol
"""
"""Clears the load on this protocol."""
self.load = 0