Skip to content

Commit 0d9c221

Browse files
committed
CM-53944-Fixed tests import ruff format
1 parent 68a8627 commit 0d9c221

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

cycode/cli/files_collector/file_excluder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ def _is_relevant_file_to_scan_common(self, scan_type: str, filename: str) -> boo
104104
)
105105
return False
106106

107-
if not (self._is_file_extension_supported(scan_type, filename)
108-
or self._is_file_prefix_supported(scan_type, filename)):
107+
if not (
108+
self._is_file_extension_supported(scan_type, filename)
109+
or self._is_file_prefix_supported(scan_type, filename)
110+
):
109111
logger.debug(
110112
'The document is irrelevant because its extension is not supported, %s',
111113
{'scan_type': scan_type, 'filename': filename},

tests/cli/files_collector/test_file_excluder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def test_files_with_excluded_extensions_in_should_be_included(self) -> None:
4242
"""Test that files containing excluded extensions are NOT excluded."""
4343
excluder = Excluder()
4444
# These should be INCLUDED because the excluded terms are in the filename
45-
assert excluder._is_relevant_file_to_scan_common('iac','project/cfg/Dockerfile') is True
46-
assert excluder._is_relevant_file_to_scan_common('iac','project/cfg/build.tf') is True
45+
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/Dockerfile') is True
46+
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/build.tf') is True
4747
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/build.tf.json') is True
4848
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/config.json') is True
4949
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/config.yaml') is True
5050
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/config.yml') is True
5151
# These should be EXCLUDED because the excluded terms are not in the filename
52-
assert excluder._is_relevant_file_to_scan_common('iac','project/cfg/build') is False
52+
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/build') is False
5353
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/build') is False
5454
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/Dockerfile.txt') is False
5555
assert excluder._is_relevant_file_to_scan_common('iac', 'project/cfg/config.ini') is False

0 commit comments

Comments
 (0)