File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
pylint/testutils/functional Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11
11
from pylint .testutils .functional .test_file import FunctionalTestFile
12
12
13
13
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.
15
16
16
17
'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.
17
20
"""
18
21
19
22
IGNORED_PARENT_DIRS = {
@@ -70,7 +73,9 @@ def _get_files_from_dir(
70
73
) -> list [Path ]:
71
74
"""Return directories and files from a directory and handles violations."""
72
75
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"
74
79
)
75
80
if len (files_without_leading_underscore ) > max_file_per_directory :
76
81
violations .append ((path , len (files_without_leading_underscore )))
You can’t perform that action at this time.
0 commit comments