Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-01-29 07:35:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-29 07:35:06 +0300
commit7095f4766593cc2b55669b032d7de0fa13fcb4c7 (patch)
tree3567f182b513225a1b522b75e144eb5b75d1b6e2 /tests
parentd434815ff7c586f6e54af667e37c9d2d12726416 (diff)
cleanup: pep8
also remove empty class parenthesis
Diffstat (limited to 'tests')
-rw-r--r--tests/python/pep8.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/python/pep8.py b/tests/python/pep8.py
index 7713ffeaaa4..551e2a87e9b 100644
--- a/tests/python/pep8.py
+++ b/tests/python/pep8.py
@@ -95,13 +95,23 @@ def main():
print(" %s" % f)
# strict imports
- print("\n\n\n# running pep8...")
+ print("\n\n\n# checking imports...")
import re
import_check = re.compile(r"\s*from\s+[A-z\.]+\s+import \*\s*")
for f, pep8_type in files:
for i, l in enumerate(open(f, 'r', encoding='utf8')):
if import_check.match(l):
print("%s:%d:0: global import bad practice" % (f, i + 1))
+ del re, import_check
+
+ print("\n\n\n# checking class definitions...")
+ import re
+ class_check = re.compile(r"\s*class\s+.*\(\):.*")
+ for f, pep8_type in files:
+ for i, l in enumerate(open(f, 'r', encoding='utf8')):
+ if class_check.match(l):
+ print("%s:%d:0: empty class (), remove" % (f, i + 1))
+ del re, class_check
print("\n\n\n# running pep8...")