Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 21, 2024
1 parent b19f23b commit 9ff146e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions tests/lint/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE
# Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt

from io import BufferedReader
from pathlib import Path

import pytest
from typing import Any
from unittest.mock import MagicMock, mock_open, patch

from typing import Any, Protocol
from io import BufferedReader
import pytest

from pylint import lint
from pylint.testutils.utils import _test_cwd
Expand All @@ -27,12 +26,11 @@
],
)
def test_query_cpu_cgroupv2(
tmp_path: Path,
contents: str,
expected: int,
tmp_path: Path,
contents: str,
expected: int,
) -> None:
"""Check that `pylint.lint.run._query_cpu` generates realistic values in cgroupsv2 systems.
"""
"""Check that `pylint.lint.run._query_cpu` generates realistic values in cgroupsv2 systems."""
builtin_open = open

def _mock_open(*args: Any, **kwargs: Any) -> BufferedReader:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pylint_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def _mock_path(*args: str, **kwargs: Any) -> pathlib.Path:
],
)
def test_pylint_run_jobs_equal_zero_dont_crash_with_cgroupv2(
tmp_path: pathlib.Path,
contents: str,
tmp_path: pathlib.Path,
contents: str,
) -> None:
"""Check that the pylint runner does not crash if `pylint.lint.run._query_cpu`
determines only a fraction of a CPU core to be available.
Expand Down

0 comments on commit 9ff146e

Please sign in to comment.