Skip to content

Commit

Permalink
chore(pre-commit): update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Oct 3, 2024
1 parent 5522c9b commit 4127c69
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
- id: debug-statements
- id: double-quote-string-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 2 additions & 0 deletions nvitop-exporter/nvitop_exporter/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# ==============================================================================
"""Prometheus exporter built on top of ``nvitop``."""

# pylint: disable=invalid-name

__version__ = '1.3.2'
__license__ = 'Apache-2.0'
__author__ = __maintainer__ = 'Xuehai Pan'
Expand Down
1 change: 1 addition & 0 deletions nvitop/callbacks/keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class GpuStatsLogger(Callback): # pylint: disable=too-many-instance-attributes
def __init__( # pylint: disable=too-many-arguments
self,
gpus: int | list[int | str] | tuple[int | str, ...],
*,
memory_utilization: bool = True,
gpu_utilization: bool = True,
intra_step_time: bool = False,
Expand Down
1 change: 1 addition & 0 deletions nvitop/callbacks/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class GpuStatsLogger(Callback): # pylint: disable=too-many-instance-attributes

def __init__( # pylint: disable=too-many-arguments
self,
*,
memory_utilization: bool = True,
gpu_utilization: bool = True,
intra_step_time: bool = False,
Expand Down
1 change: 1 addition & 0 deletions nvitop/callbacks/pytorch_lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class GpuStatsLogger(Callback): # pylint: disable=too-many-instance-attributes

def __init__( # pylint: disable=too-many-arguments
self,
*,
memory_utilization: bool = True,
gpu_utilization: bool = True,
intra_step_time: bool = False,
Expand Down
2 changes: 2 additions & 0 deletions nvitop/gui/library/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __init__(
upperbound,
width,
height,
*,
format='{:.1f}'.format, # pylint: disable=redefined-builtin
max_format=None,
baseline=0.0,
Expand Down Expand Up @@ -301,6 +302,7 @@ def __init__(
upperbound,
width,
height,
*,
format='{:.1f}'.format, # pylint: disable=redefined-builtin
max_format=None,
baseline=0.0,
Expand Down
4 changes: 2 additions & 2 deletions nvitop/gui/library/messagebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class MessageBox(Displayable): # pylint: disable=too-many-instance-attributes
class Option: # pylint: disable=too-few-public-methods
# pylint: disable-next=too-many-arguments
def __init__(self, name, key, callback, keys=(), attrs=()):
def __init__(self, name, key, callback, *, keys=(), attrs=()):
self.name = WideString(name)
self.offset = 0
self.key = normalize_keybinding(key)
Expand All @@ -31,7 +31,7 @@ def __str__(self):
return str(self.name)

# pylint: disable-next=too-many-arguments
def __init__(self, message, options, default, yes, no, cancel, win, root):
def __init__(self, message, options, *, default, yes, no, cancel, win, root):
super().__init__(win, root)

if default is None:
Expand Down
2 changes: 1 addition & 1 deletion nvitop/gui/screens/main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MainScreen(DisplayableContainer): # pylint: disable=too-many-instance-att
NAME = 'main'

# pylint: disable-next=redefined-builtin,too-many-arguments,too-many-locals,too-many-statements
def __init__(self, devices, filters, ascii, mode, win, root):
def __init__(self, devices, filters, *, ascii, mode, win, root):
super().__init__(win, root)

self.width = root.width
Expand Down
3 changes: 2 additions & 1 deletion nvitop/gui/screens/main/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ class ProcessPanel(Displayable): # pylint: disable=too-many-instance-attributes
),
}

def __init__(self, devices, compact, filters, win, root): # pylint: disable=too-many-arguments
# pylint: disable-next=too-many-arguments
def __init__(self, devices, compact, filters, *, win, root):
super().__init__(win, root)

self.devices = devices
Expand Down
1 change: 1 addition & 0 deletions nvitop/gui/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(
self,
devices,
filters=(),
*,
ascii=False, # pylint: disable=redefined-builtin
mode='auto',
interval=None,
Expand Down
2 changes: 2 additions & 0 deletions nvitop/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# ==============================================================================
"""An interactive NVIDIA-GPU process viewer and beyond, the one-stop solution for GPU process management."""

# pylint: disable=invalid-name

__version__ = '1.3.2'
__license__ = 'GPL-3.0-only AND Apache-2.0'
__author__ = __maintainer__ = 'Xuehai Pan'
Expand Down

0 comments on commit 4127c69

Please sign in to comment.