Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonghi committed Dec 18, 2024
1 parent 51e0e92 commit 009b8c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion jtop/core/nvpmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,9 @@ def set_nvpmodel_id(self, nvpmodel_id, force):
logger.warning("Force set nvpmodel {nvpmodel_id}".format(nvpmodel_id=nvpmodel_id))
else:
if nvp_mask != old_nvp_mask:
logger.error("The new nvpmodel {nvpmodel_id} has a different mask {nvp_mask}, is not compatible".format(nvpmodel_id=nvpmodel_id, nvp_mask=nvp_mask))
logger.error(
"The new nvpmodel {nvpmodel_id} has a different mask {nvp_mask}, is not compatible".format(
nvpmodel_id=nvpmodel_id, nvp_mask=nvp_mask))
return False
# Start thread Service client
self._nvp_mode_set_thread = Thread(target=self._thread_set_nvp_model, args=(nvpmodel_id, force))
Expand Down
2 changes: 1 addition & 1 deletion jtop/gui/jtopgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# In according with: https://gist.github.com/alanjcastonguay/25e4db0edd3534ab732d6ff615ca9fc1
ABC = abc.ABCMeta('ABC', (object,), {})
# Gui refresh rate
GUI_REFRESH = 20 # 1000 // 20
GUI_REFRESH = 1000 // 20
# Copyright small
COPYRIGHT_SMALL_RE = re.compile(r""".*__cr__ = ["'](.*?)['"]""", re.S)

Expand Down
4 changes: 2 additions & 2 deletions jtop/gui/lib/dialog_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import curses
from .smallbutton import SmallButton, ButtonList
from .smallbutton import ButtonList
# Gui refresh rate
GUI_REFRESH = 1000 // 20

Expand All @@ -38,7 +38,7 @@ def enable(self, title="", info={}):
self.title = title
self.info = info
self.enable_dialog_window = True

def disable(self):
self.enable_dialog_window = False

Expand Down
10 changes: 6 additions & 4 deletions jtop/gui/pcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,12 @@ def __init__(self, stdscr, jetson):
self._nvpmodel_increase = SmallButton(stdscr, self.action_nvp_increase, trigger_key='+')
self._nvpmodel_decrease = SmallButton(stdscr, self.action_nvp_decrease, trigger_key='-')
# Initialize dialog window
self._dialog_window = DialogWindow("NVP Model",
"Required a reboot to apply this change",
self.dialog_window_nvpmodel,
["Force and reboot", "Skip"])
self._dialog_window = DialogWindow(
"NVP Model",
"Required a reboot to apply this change",
self.dialog_window_nvpmodel,
["Force and reboot", "Skip"]
)
self.register_dialog_window(self._dialog_window)

def action_fan_profile(self, info, selected):
Expand Down

0 comments on commit 009b8c5

Please sign in to comment.