[Bf-blender-cvs] [ca3e19f4c52] master: Fixes for 'make check_pep8' target

Campbell Barton noreply at git.blender.org
Wed Jan 18 08:42:43 CET 2023


Commit: ca3e19f4c529fd2389f5da56ab039163778ec1e1
Author: Campbell Barton
Date:   Wed Jan 18 18:27:49 2023 +1100
Branches: master
https://developer.blender.org/rBca3e19f4c529fd2389f5da56ab039163778ec1e1

Fixes for 'make check_pep8' target

- Skip files in dirs starting with '.' (`.git` was being searched).
- Update --disable list for pylint.

===================================================================

M	tests/python/pep8.py

===================================================================

diff --git a/tests/python/pep8.py b/tests/python/pep8.py
index 2583bec8256..6b046f5a6af 100644
--- a/tests/python/pep8.py
+++ b/tests/python/pep8.py
@@ -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



More information about the Bf-blender-cvs mailing list