[Bf-blender-cvs] [83ebec7] master: Replace pep8 with flake8 checker

Campbell Barton noreply at git.blender.org
Mon Aug 1 03:53:52 CEST 2016


Commit: 83ebec73223448bb4f97f30dd930235431eb6516
Author: Campbell Barton
Date:   Mon Aug 1 11:02:01 2016 +1000
Branches: master
https://developer.blender.org/rB83ebec73223448bb4f97f30dd930235431eb6516

Replace pep8 with flake8 checker

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

M	tests/python/pep8.py

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

diff --git a/tests/python/pep8.py b/tests/python/pep8.py
index 61093fd..0e6250f 100644
--- a/tests/python/pep8.py
+++ b/tests/python/pep8.py
@@ -113,7 +113,7 @@ def main():
                 print("%s:%d:0: empty class (), remove" % (f, i + 1))
     del re, class_check
 
-    print("\n\n\n# running pep8...")
+    print("\n\n\n# running flake8...")
 
     # these are very picky and often hard to follow
     # while keeping common script formatting.
@@ -128,6 +128,10 @@ def main():
         # "imports not at top of file."
         # prefer to load as needed (lazy load addons etc).
         "E402",
+        # "do not compare types, use 'isinstance()'"
+        # times types are compared,
+        # I rather keep them specific
+        "E721",
         )
 
     for f, pep8_type in files:
@@ -138,7 +142,10 @@ def main():
         else:
             ignore_tmp = ignore
 
-        os.system("pep8 --repeat --ignore=%s '%s'" % (",".join(ignore_tmp), f))
+        os.system("flake8 "
+                  "--isolated "
+                  "--ignore=%s '%s'" %
+                  (",".join(ignore_tmp), f))
 
     # frosted
     print("\n\n\n# running frosted...")
@@ -152,6 +159,7 @@ def main():
                   "--disable="
                   "C0111,"  # missing doc string
                   "C0103,"  # invalid name
+                  "C0413,"  # import should be placed at the top
                   "W0613,"  # unused argument, may add this back
                             # but happens a lot for 'context' for eg.
                   "W0232,"  # class has no __init__, Operator/Panel/Menu etc
@@ -165,7 +173,6 @@ def main():
                   "R0914,"  # Too many local variables
                   "R0915,"  # Too many statements
                   " "
-                  "--include-ids=y "
                   "--output-format=parseable "
                   "--reports=n "
                   "--max-line-length=1000"




More information about the Bf-blender-cvs mailing list