Skip to content

Commit

Permalink
lint: appease linters
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Oct 4, 2023
1 parent 97e9a79 commit f09ce5a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .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.0.287
rev: v0.0.292
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -34,11 +34,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.9.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.14.0
hooks:
- id: pyupgrade
args: [--py37-plus] # sync with requires-python
Expand All @@ -57,7 +57,7 @@ repos:
^docs/source/conf.py$
)
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [".[toml]"]
Expand Down
2 changes: 1 addition & 1 deletion nvitop/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
from termcolor import colored as _colored
except ImportError:

def _colored( # pylint: disable=unused-argument
def _colored( # pylint: disable=unused-argument,too-many-arguments
text: str,
color: str | None = None,
on_color: str | None = None,
Expand Down
8 changes: 4 additions & 4 deletions nvitop/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@


@overload
def select_devices(
def select_devices( # pylint: disable=too-many-arguments
devices: Iterable[Device] | None,
*,
format: Literal['index'], # pylint: disable=redefined-builtin
Expand All @@ -103,7 +103,7 @@ def select_devices(


@overload
def select_devices(
def select_devices( # pylint: disable=too-many-arguments
devices: Iterable[Device] | None,
*,
format: Literal['uuid'], # pylint: disable=redefined-builtin
Expand All @@ -123,7 +123,7 @@ def select_devices(


@overload
def select_devices(
def select_devices( # pylint: disable=too-many-arguments
devices: Iterable[Device] | None,
*,
format: Literal['device'], # pylint: disable=redefined-builtin
Expand All @@ -142,7 +142,7 @@ def select_devices(
...


def select_devices( # pylint: disable=too-many-branches,too-many-statements,too-many-locals,unused-argument
def select_devices( # pylint: disable=too-many-branches,too-many-statements,too-many-locals,unused-argument,too-many-arguments
devices: Iterable[Device] | None = None,
*,
format: Literal['index', 'uuid', 'device'] = 'index', # pylint: disable=redefined-builtin
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ ignore = [
# internal use and may never raise at runtime
"S101",
# SIM105: use `contextlib.suppress(...)` instead of try-except-pass
# reduce unnessary function call
# reduce unnecessary function call
"SIM105",
]

Expand Down

0 comments on commit f09ce5a

Please sign in to comment.