diff --git a/.pylint_dict.txt b/.pylint_dict.txt index 0f175cf2..f6267cbc 100644 --- a/.pylint_dict.txt +++ b/.pylint_dict.txt @@ -19,6 +19,7 @@ sPyNNaker CFF Zenodo DBs +LCM # Sphinx keyword py @@ -51,6 +52,8 @@ abstractmethod abstractproperty classmethod classproperty +getx +setx # Python packages math @@ -59,6 +62,7 @@ configparser numpy testfixtures abc +zipfile # Misc haha @@ -67,3 +71,10 @@ whitespace ids submessage subclassed +src +dest +msg +spynnaker +cfg +X'th +etc diff --git a/spinn_utilities/abstract_context_manager.py b/spinn_utilities/abstract_context_manager.py index 44c7bce9..3c4ac989 100644 --- a/spinn_utilities/abstract_context_manager.py +++ b/spinn_utilities/abstract_context_manager.py @@ -18,8 +18,6 @@ class AbstractContextManager(object, metaclass=AbstractBase): """ Closable class that supports being used as a simple context manager. - - Deluberate speelign erorr. """ __slots__ = [] diff --git a/spinn_utilities/conf_loader.py b/spinn_utilities/conf_loader.py index 21547fbb..c47d72a7 100644 --- a/spinn_utilities/conf_loader.py +++ b/spinn_utilities/conf_loader.py @@ -153,25 +153,24 @@ def _check_config(cfg_file, default_configs, strict): logger.warning(msg) -def _read_a_config(configs, cfg_file, default_configs, strict): +def _read_a_config(configuration, cfg_file, default_configs, strict): """ Reads in a configuration file and then directly its `machine_spec_file`. - :param CamelCaseConfigParser configs: + :param CamelCaseConfigParser configuration: configuration to be updated by the reading of a file :param str cfg_file: path to file which should be read in :param CamelCaseConfigParser default_configs: configuration with just the default files in :param bool strict: Flag to say checker should raise an exception - :return: None """ _check_config(cfg_file, default_configs, strict) - configs.read(cfg_file) - if configs.has_option("Machine", "machine_spec_file"): - machine_spec_file = configs.get("Machine", "machine_spec_file") + configuration.read(cfg_file) + if configuration.has_option("Machine", "machine_spec_file"): + machine_spec_file = configuration.get("Machine", "machine_spec_file") _check_config(machine_spec_file, default_configs, strict) - configs.read(machine_spec_file) - configs.remove_option("Machine", "machine_spec_file") + configuration.read(machine_spec_file) + configuration.remove_option("Machine", "machine_spec_file") def _config_locations(filename): diff --git a/spinn_utilities/find_max_success.py b/spinn_utilities/find_max_success.py index 5966e53d..a442bb06 100644 --- a/spinn_utilities/find_max_success.py +++ b/spinn_utilities/find_max_success.py @@ -21,7 +21,7 @@ def find_max_success(max_possible, check): :type max_possible: int :param check: A boolean function that given an int value returns True for every value up and including the cut-off and - False for every value greater than the cutoff + False for every value greater than the cut-off :type check: ~typing.Callable[[int], bool] :return: The highest value that returns true for the check but is not more than the max_possible diff --git a/spinn_utilities/ping.py b/spinn_utilities/ping.py index b31947d8..d938628b 100644 --- a/spinn_utilities/ping.py +++ b/spinn_utilities/ping.py @@ -26,12 +26,12 @@ class Ping(object): unreachable = set() @staticmethod - def ping(ipaddr): + def ping(ip_address): """ Send a ping (ICMP ECHO request) to the given host. SpiNNaker boards support ICMP ECHO when booted. - :param str ipaddr: + :param str ip_address: The IP address to ping. Hostnames can be used, but are not recommended. :return: @@ -43,14 +43,14 @@ def ping(ipaddr): else: cmd = "ping -c 1 -W 1 " process = subprocess.Popen( - cmd + ipaddr, shell=True, stdout=subprocess.PIPE) + cmd + ip_address, shell=True, stdout=subprocess.PIPE) time.sleep(1.2) process.stdout.close() process.wait() return process.returncode @staticmethod - def host_is_reachable(ipaddr): + def host_is_reachable(ip_address): """ Test if a host is unreachable via ICMP ECHO. @@ -58,18 +58,18 @@ def host_is_reachable(ipaddr): This information may be cached in various ways. Transient failures are not necessarily detected or recovered from. - :param str ipaddr: + :param str ip_address: The IP address to ping. Hostnames can be used, but are not recommended. :rtype: bool """ - if ipaddr in Ping.unreachable: + if ip_address in Ping.unreachable: return False tries = 0 while (True): - if Ping.ping(ipaddr) == 0: + if Ping.ping(ip_address) == 0: return True tries += 1 if tries > 10: - Ping.unreachable.add(ipaddr) + Ping.unreachable.add(ip_address) return False