From 1921ccb72e082f7183b0182ced6ae2958e928c9e Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 11 Jun 2024 06:50:23 +0100 Subject: [PATCH] PyLint fixes --- mcmc/mcmc_model.py | 3 +++ mcmc/mcmc_parameter.py | 6 ++++++ mcmc/mcmc_root_finder_vertex.py | 14 +++++++------- mcmc/mcmc_state_variable.py | 9 +++++++++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/mcmc/mcmc_model.py b/mcmc/mcmc_model.py index f4b379e..91c56be 100644 --- a/mcmc/mcmc_model.py +++ b/mcmc/mcmc_model.py @@ -20,6 +20,9 @@ class MCMCModel(object, metaclass=AbstractBase): + """ + Base class frr Markov chain Monte Carlo models + """ @abstractmethod def get_parameters(self) -> List[MCMCParameter]: diff --git a/mcmc/mcmc_parameter.py b/mcmc/mcmc_parameter.py index e9b56a9..8a95203 100644 --- a/mcmc/mcmc_parameter.py +++ b/mcmc/mcmc_parameter.py @@ -27,8 +27,14 @@ def __init__(self, value, data_type): @property def value(self): + """ + The value of the parameter + """ return self._value @property def data_type(self): + """ + The numpy data type of the parameter + """ return self._data_type diff --git a/mcmc/mcmc_root_finder_vertex.py b/mcmc/mcmc_root_finder_vertex.py index 6661c13..50813f6 100644 --- a/mcmc/mcmc_root_finder_vertex.py +++ b/mcmc/mcmc_root_finder_vertex.py @@ -12,14 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -from pacman.model.graphs.machine import MachineVertex -from pacman.model.resources import ConstantSDRAM -from spinn_utilities.overrides import overrides -from pacman.model.placements import Placement +from enum import Enum + +from spinn_utilities.overrides import overrides from spinnman.model.enums import ExecutableType +from pacman.model.graphs.machine import MachineVertex +from pacman.model.placements import Placement +from pacman.model.resources import ConstantSDRAM + from spinn_front_end_common.abstract_models.abstract_has_associated_binary \ import AbstractHasAssociatedBinary from spinn_front_end_common.abstract_models\ @@ -27,9 +30,6 @@ import AbstractGeneratesDataSpecification from spinn_front_end_common.interface.ds import DataSpecificationGenerator -from enum import Enum - - class MCMCRootFinderRegions(Enum): """ Regions in the MCMCRootFinder Data """ diff --git a/mcmc/mcmc_state_variable.py b/mcmc/mcmc_state_variable.py index fa1d877..334b59e 100644 --- a/mcmc/mcmc_state_variable.py +++ b/mcmc/mcmc_state_variable.py @@ -28,12 +28,21 @@ def __init__(self, name, initial_value, data_type): @property def name(self): + """ + The name of the variable + """ return self._name @property def initial_value(self): + """ + + """ return self._initial_value @property def data_type(self): + """ + The numpy data type of the variable. + """ return self._data_type