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 1111from pylint .testutils .functional .test_file import FunctionalTestFile
1212
1313REASONABLY_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
1922IGNORED_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 )))
You can’t perform that action at this time.
0 commit comments