Skip to content

Commit ce679b0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7e41106 commit ce679b0

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

cmake_pc_hooks/_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def parse_args(self, args):
8888
'--read-json-db',
8989
action='store_true',
9090
help=(
91-
'Run hooks on files found in compile_commands.json '
92-
'(if found and in addition to files specified on CLI)'
91+
'Run hooks on files found in compile_commands.json (if found and in addition to files specified on CLI)'
9392
),
9493
)
9594

tests/python/_argparse_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _add_simple_args(parser):
3535
# ------------------------------------------------------------------------------
3636

3737

38-
@pytest.fixture()
38+
@pytest.fixture
3939
def simple_toml_content():
4040
return dedent(
4141
"""

tests/python/_cmake_test.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ def test_configure_cmake(mocker, tmp_path, clean_build, returncode, no_cmake_con
238238
mocker.patch(filelock_module_name, FileLock)
239239
InterProcessReaderWriterLock = mocker.MagicMock(fasteners.InterProcessReaderWriterLock) # noqa: N806
240240
mocker.patch(interprocess_rw_lock_module_name, InterProcessReaderWriterLock)
241-
_configure = mocker.Mock(return_value=returncode)
242-
mocker.patch(internal_cmake_configure_name, _configure)
241+
configure = mocker.Mock(return_value=returncode)
242+
mocker.patch(internal_cmake_configure_name, configure)
243243
parse_log = mocker.patch('cmake_pc_hooks._cmake.CMakeCommand._parse_cmake_trace_log')
244244

245245
# ----------------------------------
@@ -262,12 +262,12 @@ def test_configure_cmake(mocker, tmp_path, clean_build, returncode, no_cmake_con
262262
if no_cmake_configure:
263263
FileLock.assert_not_called()
264264
InterProcessReaderWriterLock.assert_not_called()
265-
_configure.assert_not_called()
265+
configure.assert_not_called()
266266
return
267267

268268
FileLock.assert_called_once_with(build_dir / '_cmake_configure_try_lock')
269269
InterProcessReaderWriterLock.assert_called_once_with(build_dir / '_cmake_configure_lock')
270-
_configure.assert_called_once_with(
270+
configure.assert_called_once_with(
271271
lock_files=(InterProcessReaderWriterLock.call_args[0][0], FileLock.call_args[0][0]), clean_build=clean_build
272272
)
273273

@@ -297,8 +297,8 @@ def timeout(blocking): # noqa: ARG001
297297
interprocess_lock = mocker.MagicMock()
298298
InterProcessReaderWriterLock = mocker.MagicMock(return_value=interprocess_lock) # noqa: N806
299299
mocker.patch(interprocess_rw_lock_module_name, InterProcessReaderWriterLock)
300-
_configure = mocker.Mock(return_value=0)
301-
mocker.patch(internal_cmake_configure_name, _configure)
300+
configure = mocker.Mock(return_value=0)
301+
mocker.patch(internal_cmake_configure_name, configure)
302302

303303
# ----------------------------------
304304

@@ -317,7 +317,7 @@ def timeout(blocking): # noqa: ARG001
317317
FileLock.assert_called_once()
318318
InterProcessReaderWriterLock.assert_called_once()
319319
interprocess_lock.read_lock.assert_called_once()
320-
_configure.assert_not_called()
320+
configure.assert_not_called()
321321

322322

323323
def test_configure_invalid(mocker):
@@ -327,8 +327,8 @@ def test_configure_invalid(mocker):
327327
mocker.patch(filelock_module_name, FileLock)
328328
InterProcessReaderWriterLock = mocker.MagicMock(fasteners.InterProcessReaderWriterLock) # noqa: N806
329329
mocker.patch(interprocess_rw_lock_module_name, InterProcessReaderWriterLock)
330-
_configure = mocker.Mock(return_value=1)
331-
mocker.patch(internal_cmake_configure_name, _configure)
330+
configure = mocker.Mock(return_value=1)
331+
mocker.patch(internal_cmake_configure_name, configure)
332332

333333
# ----------------------------------
334334

tests/python/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# ==============================================================================
99

1010

11-
@pytest.fixture()
11+
@pytest.fixture
1212
def compile_commands(tmp_path):
1313
path = tmp_path / 'build' / 'compile_commands.json'
1414

0 commit comments

Comments
 (0)