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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-04-07 05:38:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-07 05:38:03 +0400
commit63d523336f3876f6dca5affd66a190df88a87747 (patch)
treeb4fb4677fe1138ae0476526d442a52b0804fa30b /source/tests
parent6774e727a28186258b6bfa443da0ef7aec280be3 (diff)
freestyle lineset `tag` attribute was defined but not used, also some code cleanup.
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/bl_load_addons.py4
-rw-r--r--source/tests/pep8.py17
2 files changed, 17 insertions, 4 deletions
diff --git a/source/tests/bl_load_addons.py b/source/tests/bl_load_addons.py
index 83bdfb42c95..f04ae64ee73 100644
--- a/source/tests/bl_load_addons.py
+++ b/source/tests/bl_load_addons.py
@@ -51,7 +51,7 @@ def test_load_addons():
addon_utils.enable(mod_name)
if mod_name not in addons:
addons_fail.append(mod_name)
-
+
if addons_fail:
print("addons failed to load (%d):" % len(addons_fail))
for mod_name in addons_fail:
@@ -94,7 +94,7 @@ def reload_addons(do_reload=True, do_reverse=True):
def main():
# first load addons, print a list of all addons that fail
test_load_addons()
-
+
reload_addons(do_reload=False, do_reverse=False)
reload_addons(do_reload=False, do_reverse=True)
reload_addons(do_reload=True, do_reverse=True)
diff --git a/source/tests/pep8.py b/source/tests/pep8.py
index cb86953e00e..3ae1828c59a 100644
--- a/source/tests/pep8.py
+++ b/source/tests/pep8.py
@@ -37,6 +37,7 @@ import os
# should be directly after the license header, ~20 in most cases
PEP8_SEEK_COMMENT = 40
SKIP_PREFIX = "./tools", "./config", "./scons", "./extern"
+SKIP_ADDONS = True
FORCE_PEP8_ALL = False
@@ -76,6 +77,10 @@ def main():
if [None for prefix in SKIP_PREFIX if f.startswith(prefix)]:
continue
+ if SKIP_ADDONS:
+ if (os.sep + "addons") in f:
+ continue
+
pep8_type = FORCE_PEP8_ALL or is_pep8(f)
if pep8_type:
@@ -98,12 +103,20 @@ def main():
print("%s:%d:0: global import bad practice" % (f, i + 1))
print("\n\n\n# running pep8...")
+
+ # these are very picky and often hard to follow
+ # while keeping common script formatting.
+ ignore = "E122", "E123", "E124", "E125", "E126", "E127", "E128"
+
for f, pep8_type in files:
+
if pep8_type == 1:
# E501:80 line length
- os.system("pep8 --repeat --ignore=E501 '%s'" % (f))
+ ignore_tmp = ignore + ("E501", )
else:
- os.system("pep8 --repeat '%s'" % (f))
+ ignore_tmp = ignore
+
+ os.system("pep8 --repeat --ignore=%s '%s'" % (",".join(ignore_tmp), f))
# pyflakes
print("\n\n\n# running pyflakes...")