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 50fa6c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
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
9 changes: 5 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,8 @@ def select_devices(
...


def select_devices( # pylint: disable=too-many-branches,too-many-statements,too-many-locals,unused-argument
# pylint: disable-next=too-many-branches,too-many-statements,too-many-locals,unused-argument,too-many-arguments
def select_devices(
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 50fa6c3

Please sign in to comment.