diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-12-09 12:39:53 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-03-17 14:00:06 -0500 |
commit | cfcb97616ae6cd852804eade3afd322e5adc48d2 (patch) | |
tree | e47ae9326fb6c26462a583d4d7cfc40ccd547d35 /mpm/python/usrp_mpm | |
parent | 93f7ffb73ad4fda8936c26aa6c8598ca01d95809 (diff) | |
download | uhd-cfcb97616ae6cd852804eade3afd322e5adc48d2.tar.gz uhd-cfcb97616ae6cd852804eade3afd322e5adc48d2.tar.bz2 uhd-cfcb97616ae6cd852804eade3afd322e5adc48d2.zip |
mpm: e3xx: Fix Pylint warnings in periph_mgr classes
- Whitespace
- Long lines
- Superfluous imports
Diffstat (limited to 'mpm/python/usrp_mpm')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/e31x.py | 15 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/e320.py | 10 |
2 files changed, 11 insertions, 14 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/e31x.py b/mpm/python/usrp_mpm/periph_manager/e31x.py index e7da81ca5..dc6e6be21 100644 --- a/mpm/python/usrp_mpm/periph_manager/e31x.py +++ b/mpm/python/usrp_mpm/periph_manager/e31x.py @@ -8,7 +8,6 @@ E310 implementation module """ -from __future__ import print_function import copy import re from six import itervalues @@ -411,9 +410,9 @@ class e31x(ZynqComponents, PeriphManagerBase): Load all overlays required to go into idle power savings mode. """ idle_overlay = self.get_idle_dt_overlay(self.device_info) - self.log.debug("Motherboard requests device tree overlay for Idle power savings mode: {}".format( - idle_overlay - )) + self.log.debug( + "Motherboard requests device tree overlay for Idle power savings mode: {}" + .format(idle_overlay)) dtoverlay.apply_overlay_safe(idle_overlay) def remove_idle_overlay(self): @@ -504,8 +503,8 @@ class e31x(ZynqComponents, PeriphManagerBase): if xport_type == "udp": return self._xport_mgrs[xport_type].get_chdr_link_options( self.mboard_info['rpc_connection']) - else: - return self._xport_mgrs[xport_type].get_chdr_link_options() + # else: + return self._xport_mgrs[xport_type].get_chdr_link_options() ########################################################################### # Device info @@ -727,7 +726,7 @@ class e31x(ZynqComponents, PeriphManagerBase): """ return self.mboard_info - def set_mb_eeprom(self, eeprom_vals): + def set_mb_eeprom(self, _eeprom_vals): """ See PeriphManagerBase.set_mb_eeprom() for docs. """ @@ -743,7 +742,7 @@ class e31x(ZynqComponents, PeriphManagerBase): db_eeprom_data = copy.copy(self.dboard.device_info) return db_eeprom_data - def set_db_eeprom(self, dboard_idx, eeprom_data): + def set_db_eeprom(self, _dboard_idx, _eeprom_data): """ See PeriphManagerBase.set_db_eeprom() for docs. """ diff --git a/mpm/python/usrp_mpm/periph_manager/e320.py b/mpm/python/usrp_mpm/periph_manager/e320.py index 439f6cb58..0d55e56ba 100644 --- a/mpm/python/usrp_mpm/periph_manager/e320.py +++ b/mpm/python/usrp_mpm/periph_manager/e320.py @@ -7,11 +7,10 @@ E320 implementation module """ -from __future__ import print_function import bisect import copy import re -import threading +from functools import partial from six import iteritems, itervalues from usrp_mpm.components import ZynqComponents from usrp_mpm.dboard_manager import Neon @@ -153,7 +152,6 @@ class e320(ZynqComponents, PeriphManagerBase): self._time_source = None self._gpsd = None self.dboard = self.dboards[E320_DBOARD_SLOT_IDX] - from functools import partial for sensor_name, sensor_cb_name in self.mboard_sensor_callback_map.items(): if sensor_name[:5] == 'temp_': setattr(self, sensor_cb_name, partial(self.get_temp_sensor, sensor_name)) @@ -372,8 +370,8 @@ class e320(ZynqComponents, PeriphManagerBase): if xport_type == "udp": return self._xport_mgrs[xport_type].get_chdr_link_options( self.mboard_info['rpc_connection']) - else: - return self._xport_mgrs[xport_type].get_chdr_link_options() + # else: + return self._xport_mgrs[xport_type].get_chdr_link_options() ########################################################################### # Device info @@ -455,7 +453,7 @@ class e320(ZynqComponents, PeriphManagerBase): def get_ref_clock_freq(self): " Returns the currently active reference clock frequency" clock_source = self.get_clock_source() - if clock_source == "internal" or clock_source == "gpsdo": + if clock_source in ("internal", "gpsdo"): return E320_DEFAULT_INT_CLOCK_FREQ # elif clock_source == "external": return self._ext_clock_freq |