From 65df1f2555095e9af67372a47a1ca888b246f0f7 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 21 Oct 2024 10:20:13 +0100 Subject: [PATCH] flake8 --- pacman/model/resources/shared_sdram.py | 4 +--- pacman/model/resources/variable_sdram.py | 1 + pacman/utilities/json_utils.py | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pacman/model/resources/shared_sdram.py b/pacman/model/resources/shared_sdram.py index 14984474c..aaef641ad 100644 --- a/pacman/model/resources/shared_sdram.py +++ b/pacman/model/resources/shared_sdram.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from copy import deepcopy import math from typing import Any, Dict, Optional, Self, TextIO, Union @@ -43,7 +42,7 @@ class SharedSDRAM(AbstractSDRAM): "_shared" ) - def __init__(self, shared: Dict[str,AbstractSDRAM], + def __init__(self, shared: Dict[str, AbstractSDRAM], per_core: Optional[AbstractSDRAM] = None) -> None: """ Creates an SDRAM of both per_core and shared requirements. @@ -65,7 +64,6 @@ def __init__(self, shared: Dict[str,AbstractSDRAM], else: self._per_core = per_core - @overrides(AbstractSDRAM.get_total_sdram) def get_total_sdram(self, n_timesteps: Optional[int]) -> int: running = self._per_core.get_total_sdram(n_timesteps) diff --git a/pacman/model/resources/variable_sdram.py b/pacman/model/resources/variable_sdram.py index e0fcf3329..5f63e2a01 100644 --- a/pacman/model/resources/variable_sdram.py +++ b/pacman/model/resources/variable_sdram.py @@ -22,6 +22,7 @@ from .abstract_sdram import AbstractSDRAM from .constant_sdram import ConstantSDRAM + def _ceil(value: Union[int, float, numpy.integer, numpy.floating]) -> int: return math.ceil(value) diff --git a/pacman/utilities/json_utils.py b/pacman/utilities/json_utils.py index 0b70699e2..e59f1a186 100644 --- a/pacman/utilities/json_utils.py +++ b/pacman/utilities/json_utils.py @@ -22,10 +22,10 @@ from spinn_utilities.typing.json import JsonArray, JsonObject from pacman.data import PacmanDataView -from pacman.model.graphs.machine import MachineVertex, SimpleMachineVertex +from pacman.model.graphs.machine import SimpleMachineVertex from pacman.model.placements.placement import Placement from pacman.model.resources import ( - IPtagResource, ReverseIPtagResource, VariableSDRAM) + IPtagResource, ReverseIPtagResource) from pacman.model.routing_info import BaseKeyAndMask