Skip to content

Commit 52f5ef9

Browse files
[functional tests] Only count the number of python file for the reasonably displayable limit
1 parent 0d056ff commit 52f5ef9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pylint/testutils/functional/find_functional_tests.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
from pylint.testutils.functional.test_file import FunctionalTestFile
1212

1313
REASONABLY_DISPLAYABLE_VERTICALLY = 49
14-
"""'Wet finger' number of files that are reasonable to display by an IDE.
14+
"""'Wet finger' number of python files that are reasonable to have in a functional test
15+
directory.
1516
1617
'Wet finger' as in 'in my settings there are precisely this many'.
18+
Initially the total number of file then we started counting only the python files to
19+
avoid moving a lot of files.
1720
"""
1821

1922
IGNORED_PARENT_DIRS = {
@@ -70,7 +73,9 @@ def _get_files_from_dir(
7073
) -> list[Path]:
7174
"""Return directories and files from a directory and handles violations."""
7275
files_without_leading_underscore = list(
73-
p for p in path.iterdir() if not p.stem.startswith("_")
76+
p
77+
for p in path.iterdir()
78+
if not p.stem.startswith("_") and p.suffix == ".py"
7479
)
7580
if len(files_without_leading_underscore) > max_file_per_directory:
7681
violations.append((path, len(files_without_leading_underscore)))

0 commit comments

Comments
 (0)