chore(pre-commit): update pre-commit hooks

This commit is contained in:
Xuehai Pan 2026-03-31 20:10:55 +08:00
parent fe983b137a
commit 43015c916f
7 changed files with 22 additions and 14 deletions

View file

@ -29,7 +29,7 @@ repos:
args: [--ignore-case]
files: ^docs/source/spelling_wordlist\.txt$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.7
rev: v0.15.8
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]

View file

@ -6,7 +6,7 @@
[![PyPI](https://img.shields.io/pypi/v/nvitop?label=pypi&logo=pypi)](https://pypi.org/project/nvitop)
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/nvitop?label=conda&logo=condaforge)](https://anaconda.org/conda-forge/nvitop)
[![Documentation Status](https://img.shields.io/readthedocs/nvitop?label=docs&logo=readthedocs)](https://nvitop.readthedocs.io)
[![Downloads](https://static.pepy.tech/personalized-badge/nvitop?period=total&left_color=grey&right_color=blue&left_text=downloads)](https://pepy.tech/project/nvitop)
[![Downloads](https://static.pepy.tech/personalized-badge/nvitop?period=total&left_color=gray&right_color=blue&left_text=downloads)](https://pepy.tech/project/nvitop)
[![GitHub Repo Stars](https://img.shields.io/github/stars/XuehaiPan/nvitop?label=stars&logo=github&color=brightgreen)](https://github.com/XuehaiPan/nvitop/stargazers)
[![License](https://img.shields.io/github/license/XuehaiPan/nvitop?label=license&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi43NSAyLjc1YS43NS43NSAwIDAwLTEuNSAwVjQuNUg5LjI3NmExLjc1IDEuNzUgMCAwMC0uOTg1LjMwM0w2LjU5NiA1Ljk1N0EuMjUuMjUgMCAwMTYuNDU1IDZIMi4zNTNhLjc1Lj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S40MTggNS40MTggMCAwMDIuNTU3LS42MzVMNC43NSA5LjM2OGwtMi41NTcgNS44M3ptMTQuNTEtLjAyNGMuMDgyLjA0LjE3NC4wODMuMjc1LjEyNi41My4yMjMgMS4zMDUuNDUgMi4yNzIuNDVhNS44NDYgNS44NDYgMCAwMDIuNTQ3LS41NzZMMTkuMjUgOS4zNjdsLTIuNTQ3IDUuODA3eiI+PC9wYXRoPjwvc3ZnPgo=)](#license)

View file

@ -28,7 +28,7 @@ An interactive NVIDIA-GPU process viewer and beyond, the one-stop solution for G
.. |Documentation Status| image:: https://img.shields.io/readthedocs/nvitop?label=docs&logo=readthedocs
.. _Documentation Status: https://nvitop.readthedocs.io
.. |Downloads| image:: https://static.pepy.tech/personalized-badge/nvitop?period=total&left_color=grey&right_color=blue&left_text=downloads
.. |Downloads| image:: https://static.pepy.tech/personalized-badge/nvitop?period=total&left_color=gray&right_color=blue&left_text=downloads
.. _Downloads: https://pepy.tech/project/nvitop
.. |GitHub Repo Stars| image:: https://img.shields.io/github/stars/XuehaiPan/nvitop?label=stars&logo=github&color=brightgreen

View file

@ -185,7 +185,7 @@ function exec_cmd() {
idx = 0;
in_string = 0;
double_quoted = 1;
printf("%s$", BOLD WHITE);
printf("%s$", RESET BOLD WHITE);
}
{
for (i = 1; i <= NF; ++i) {

View file

@ -27,7 +27,6 @@ __all__ = [
'QUANT_KEY',
'REVERSED_SPECIAL_KEYS',
'SPECIAL_KEYS',
'SPECIAL_KEYS',
'SPECIAL_KEYS_UNCASED',
'KeyBuffer',
'KeyMaps',

View file

@ -94,20 +94,28 @@ class DevicePanel(BasePanel): # pylint: disable=too-many-instance-attributes
self._daemon_running = threading.Event()
self.formats_compact: list[str] = [
'{physical_index:>3} {fan_speed_string:>3} {temperature_string:>4} '
'{performance_state:<3}{power_status:>13} '
'{memory_usage:>20}{gpu_utilization_string:>7} {compute_mode:>11}',
(
'{physical_index:>3} {fan_speed_string:>3} {temperature_string:>4} '
'{performance_state:<3}{power_status:>13} '
'{memory_usage:>20}{gpu_utilization_string:>7} {compute_mode:>11}'
),
]
self.formats_full: list[str] = [
'{physical_index:>3} {name:<19} {persistence_mode:>4} '
'{bus_id:<16} {display_active:>3}{total_volatile_uncorrected_ecc_errors:>20}',
'{fan_speed_string:>3} {temperature_string:>4} {performance_state:^4} {power_status:>13} '
'{memory_usage:>20}{gpu_utilization_string:>7} {compute_mode:>11}',
(
'{physical_index:>3} {name:<19} {persistence_mode:>4} '
'{bus_id:<16} {display_active:>3}{total_volatile_uncorrected_ecc_errors:>20}'
),
(
'{fan_speed_string:>3} {temperature_string:>4} {performance_state:^4} {power_status:>13} '
'{memory_usage:>20}{gpu_utilization_string:>7} {compute_mode:>11}'
),
]
self.mig_formats: list[str] = [
'{physical_index:>2}:{mig_index:<2}{name:>12} @ GI/CI:{gpu_instance_id:>2}/{compute_instance_id:<2}'
'{memory_usage:>20} │ BAR1: {bar1_memory_used_human:>8} / {bar1_memory_percent_string:>3}',
(
'{physical_index:>2}:{mig_index:<2}{name:>12} @ GI/CI:{gpu_instance_id:>2}/{compute_instance_id:<2}'
'{memory_usage:>20} │ BAR1: {bar1_memory_used_human:>8} / {bar1_memory_percent_string:>3}'
),
]
if IS_WINDOWS:

View file

@ -104,6 +104,7 @@ spelling.spelling-dict = "en_US"
spelling.spelling-private-dict-file = "docs/source/spelling_wordlist.txt"
[tool.codespell]
builtin = "clear,rare,en-GB_to_en-US"
ignore-words = "docs/source/spelling_wordlist.txt"
[tool.ruff]