style cleanup: pep8
authorCampbell Barton <ideasman42@gmail.com>
Mon, 8 Oct 2012 10:03:01 +0000 (10:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 8 Oct 2012 10:03:01 +0000 (10:03 +0000)
15 files changed:
build_files/buildbot/master.cfg
build_files/buildbot/master_unpack.py
build_files/buildbot/slave_pack.py
build_files/cmake/cmake_static_check_clang_array.py
build_files/cmake/cmake_static_check_cppcheck.py
build_files/cmake/cmake_static_check_smatch.py
build_files/cmake/cmake_static_check_sparse.py
build_files/cmake/cmake_static_check_splint.py
build_files/cmake/project_source_info.py
doc/python_api/sphinx_doc_gen.py
source/blender/python/rna_dump.py
source/tests/batch_import.py
source/tests/bl_load_addons.py
source/tests/bl_load_py_modules.py
source/tests/bl_mesh_modifiers.py

index 066c133d3357d085ab95926d3e21a59f0ec5f1a6..1bd47303b2f017f84c0f6cf85c14946b880b1b11 100644 (file)
@@ -28,8 +28,8 @@ c['slavePortnum'] = 9989
 from buildbot.changes.svnpoller import SVNPoller
 
 c['change_source'] = SVNPoller(
-       'https://svn.blender.org/svnroot/bf-blender/trunk/',
-       pollinterval=1200)
+    'https://svn.blender.org/svnroot/bf-blender/trunk/',
+    pollinterval=1200)
 
 # BUILDERS
 #
@@ -137,7 +137,8 @@ c['schedulers'] = []
 #                        builderNames=buildernames,
 #                        periodicBuildTimer=24*60*60))
 
-c['schedulers'].append(timed.Nightly(name='nightly',
+c['schedulers'].append(timed.Nightly(
+    name='nightly',
     builderNames=buildernames,
     hour=3,
     minute=0))
index f67bd294496a0e2da08166b407f753978907614c..ecacf3bff6fd2027fb60606c1f8d63b0d0bb5a95 100644 (file)
@@ -112,7 +112,7 @@ branch = get_branch(packagename)
 
 if platform == '':
     sys.stderr.write('Failed to detect platform ' +
-        'from package: %r\n' % packagename)
+                     'from package: %r\n' % packagename)
     sys.exit(1)
 
 # extract
index 654efd72876064bc3a087fc2f4147b1aa11f913e..eafb25ac7b09a0bbe9f090ad0ba661591858c3d6 100644 (file)
@@ -50,9 +50,9 @@ if builder.find('scons') != -1:
         install_dir = os.path.join('..', 'install', builder)
 
         scons_options += ['WITH_BF_NOBLENDER=True', 'WITH_BF_PLAYER=False',
-            'BF_BUILDDIR=' + build_dir,
-            'BF_INSTALLDIR=' + install_dir,
-            'WITHOUT_BF_INSTALL=True']
+                          'BF_BUILDDIR=' + build_dir,
+                          'BF_INSTALLDIR=' + install_dir,
+                          'WITHOUT_BF_INSTALL=True']
 
         config = None
         bits = None
index 8afaf0805f2be0fab63e2ad3098d4ff312a5e053..941407170ff34991809c22e8276effeffa26276f 100644 (file)
@@ -52,7 +52,7 @@ def main():
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]
-              )
+               )
 
         check_commands.append((c, cmd))
 
index 4ea357162ca88aa3ce39406e35abd215f46fdfe8..c458e8ede112a10a452b094b890a3c6cfe356a09 100644 (file)
@@ -55,7 +55,7 @@ def main():
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]
-              )
+               )
 
         check_commands.append((c, cmd))
 
index eebb2e94f93f9703ac352fe7054105f24c348cdb..5681d2ae5edaf2a33daeeb50a7a03f7edad82c68 100644 (file)
@@ -50,7 +50,7 @@ def main():
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]
-              )
+               )
 
         check_commands.append((c, cmd))
 
index 8862fc78bb5a56e96903af60576b2e1f5d8ed382..4f4eb838dd5b0a52ac5887d3b61ab95d47c16f8e 100644 (file)
@@ -48,7 +48,7 @@ def main():
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]
-              )
+               )
 
         check_commands.append((c, cmd))
 
index b753a6122cda1fc2c96c94d31d3239d0aa6f3cad..7be28c01af8a66da3ce1cc75889d12ca4232cd78 100644 (file)
@@ -80,7 +80,7 @@ def main():
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]
-              )
+               )
 
         check_commands.append((c, cmd))
 
index ed17ec5bac4bd4d043e72b4728da9d7586c04e62..17a9327a358f5d617c8280b347633a2394940de4 100644 (file)
@@ -85,7 +85,7 @@ def makefile_log():
     print("running make with --dry-run ...")
     process = subprocess.Popen(["make", "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"],
                                 stdout=subprocess.PIPE,
-                                )
+                               )
 
     while process.poll():
         time.sleep(1)
index 186f67b0df6da75eb6d7400318e30ace7f1dfbcd..0e6ef764116ba13b290bf59168db1fc45671a4ec 100644 (file)
@@ -399,7 +399,7 @@ SPHINX_THEMES = {'bf': ['blender-org'],  # , 'naiad',
 
 available_themes = SPHINX_THEMES['bf'] + SPHINX_THEMES['sphinx']
 if ARGS.sphinx_theme not in available_themes:
-    print ("Please choose a theme among: %s" % ', '.join(available_themes))
+    print("Please choose a theme among: %s" % ', '.join(available_themes))
     sys.exit()
 
 if ARGS.sphinx_theme in SPHINX_THEMES['bf']:
index 489f011e693df326c875a0548a0596d6816a5677..15cc60d997e89749fb6e958f9d965c3bf9562b6c 100644 (file)
@@ -95,7 +95,7 @@ def seek(r, txt, recurs):
         if GEN_PATH:
             newtxt = txt + '.' + item
 
-        if item == 'rna_type' and VERBOSE_TYPE == False:  # just avoid because it spits out loads of data
+        if item == 'rna_type' and VERBOSE_TYPE is False:  # just avoid because it spits out loads of data
             continue
 
         value = getattr(r, item, None)
@@ -114,7 +114,7 @@ def seek(r, txt, recurs):
         except:
             length = 0
 
-        if VERBOSE == False and length >= 4:
+        if VERBOSE is False and length >= 4:
             for i in (0, length - 1):
                 if i > 0:
                     if PRINT_DATA:
index 5c228c014cae29d05ca0c9224ee3f09fc82f56a2..177ab8ea0b09b286f7c6dff51c6f96c93fc99a84 100644 (file)
@@ -63,12 +63,12 @@ def clear_scene():
 
 
 def batch_import(operator="",
-                   path="",
-                   save_path="",
-                   match="",
-                   start=0,
-                   end=sys.maxsize,
-                   ):
+                 path="",
+                 save_path="",
+                 match="",
+                 start=0,
+                 end=sys.maxsize,
+                 ):
     import addon_utils
     _reset_all = addon_utils.reset_all  # XXX, hack
 
index 21a0101d68453e84fcf5ba58f6d4a0de2087e3b0..5d9ac75036215f0925b4ab627560a8d8095ad1dc 100644 (file)
@@ -36,7 +36,7 @@ def reload_addons(do_reload=True, do_reverse=True):
     for mod_name in list(addons.keys()):
         addon_utils.disable(mod_name)
 
-    assert(bool(addons) == False)
+    assert(bool(addons) is False)
 
     # Run twice each time.
     for i in (0, 1):
index 619cad67cb8e801b15e412a1b67e464cff3514ec..b634b4c43856e2fe2d4e024acaa46ff71f3d4e7f 100644 (file)
@@ -49,7 +49,7 @@ def load_addons():
     for mod_name in list(addons.keys()):
         addon_utils.disable(mod_name)
 
-    assert(bool(addons) == False)
+    assert(bool(addons) is False)
 
     for mod in modules:
         mod_name = mod.__name__
index 390679800f60b6c8320245b39516b65fa30cd2b4..92fae25df16059bc07c281524c08c261e8da5666 100644 (file)
@@ -846,7 +846,7 @@ if __name__ == "__main__":
     @persistent
     def load_handler(dummy):
         print("Load Handler:", bpy.data.filepath)
-        if load_handler.first == False:
+        if load_handler.first is False:
             bpy.app.handlers.scene_update_post.remove(load_handler)
             try:
                 main()