Fixes for 'make check_pep8' target

- Skip files in dirs starting with '.' (`.git` was being searched).
- Update --disable list for pylint.
This commit is contained in:
Campbell Barton 2023-01-18 18:27:49 +11:00
parent 9e5e2aa775
commit ca3e19f4c5
1 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,8 @@ FORCE_PEP8_ALL = False
def file_list_py(path):
for dirpath, _dirnames, filenames in os.walk(path):
for dirpath, dirnames, filenames in os.walk(path):
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
for filename in filenames:
if filename.endswith((".py", ".cfg")):
yield os.path.join(dirpath, filename)
@ -93,12 +94,11 @@ def check_files_pylint(files):
"--disable="
"C0111," # missing doc string
"C0103," # invalid name
"C0209," # Formatting a regular string which could be a f-string
"C0302," # Too many lines in module
"C0413," # import should be placed at the top
"C0415," # Import outside toplevel
"W0613," # unused argument, may add this back
# but happens a lot for 'context' for eg.
"W0232," # class has no __init__, Operator/Panel/Menu etc
"W0142," # Used * or ** magic
# even needed in some cases
"R0902," # Too many instance attributes
"R0903," # Too many statements
"R0911," # Too many return statements