mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 06:06:12 -06:00
chore(pre-commit): update pre-commit hooks
This commit is contained in:
parent
a5f8a525c7
commit
996078bfb8
6 changed files with 12 additions and 5 deletions
|
|
@ -25,8 +25,11 @@ repos:
|
|||
- id: check-ast
|
||||
fail_fast: true
|
||||
- id: debug-statements
|
||||
- id: file-contents-sorter
|
||||
args: [--ignore-case]
|
||||
files: ^docs/source/spelling_wordlist\.txt$
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.13.3
|
||||
rev: v0.14.1
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: [--fix, --exit-non-zero-on-fix]
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ csv
|
|||
ctrl
|
||||
ctx
|
||||
cuda
|
||||
cudaxx
|
||||
cudadevice
|
||||
cudaerror
|
||||
cudaxx
|
||||
cwd
|
||||
devicesnapshot
|
||||
displayables
|
||||
|
|
|
|||
|
|
@ -3076,9 +3076,11 @@ class _PhysicalDeviceAttrs(NamedTuple):
|
|||
support_mig_mode: bool
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
_PHYSICAL_DEVICE_ATTRS: OrderedDict[str, _PhysicalDeviceAttrs] | None = None
|
||||
_GLOBAL_PHYSICAL_DEVICE: PhysicalDevice | None = None
|
||||
_GLOBAL_PHYSICAL_DEVICE_LOCK: threading.RLock = threading.RLock()
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
|
||||
def _get_all_physical_device_attrs() -> OrderedDict[str, _PhysicalDeviceAttrs]:
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ def reverse_ppid_map() -> dict[int, list[int]]:
|
|||
return ret
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
if LINUX:
|
||||
WSL = _os.getenv('WSL_DISTRO_NAME', default=None)
|
||||
if WSL is not None and WSL == '':
|
||||
|
|
@ -147,3 +148,4 @@ else:
|
|||
WSL = None
|
||||
WINDOWS_SUBSYSTEM_FOR_LINUX = WSL
|
||||
"""The Linux distribution name of the Windows Subsystem for Linux."""
|
||||
# pylint: enable=invalid-name
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ if TYPE_CHECKING:
|
|||
__all__ = ['CursesShortcuts', 'libcurses', 'setlocale_utf8']
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
LIGHT_THEME: bool = False
|
||||
DEFAULT_FOREGROUND: int = curses.COLOR_WHITE
|
||||
DEFAULT_BACKGROUND: int = curses.COLOR_BLACK
|
||||
|
|
@ -47,9 +48,8 @@ TRUE_COLORS: dict[str | tuple[int, int, int], int] = {
|
|||
'bright white': 15,
|
||||
**{f'preserved {i:02d}': i for i in range(16, 64)},
|
||||
}
|
||||
|
||||
|
||||
BASE_ATTR: int = 0
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
|
||||
def _init_color_theme(light_theme: bool = False) -> None:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# This file is part of nvitop, the interactive NVIDIA-GPU process viewer.
|
||||
# License: GNU GPL version 3.
|
||||
|
||||
# pylint: disable=missing-module-docstring,missing-function-docstring
|
||||
# pylint: disable=missing-module-docstring,missing-function-docstring,invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue