pep8 cleanup
authorCampbell Barton <ideasman42@gmail.com>
Sun, 27 Mar 2011 05:23:14 +0000 (05:23 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 27 Mar 2011 05:23:14 +0000 (05:23 +0000)
13 files changed:
build_files/buildbot/master.cfg
build_files/buildbot/master_unpack.py
build_files/buildbot/slave_compile.py
build_files/buildbot/slave_pack.py
build_files/buildbot/slave_test.py
build_files/cmake/cmake_qtcreator_project.py
build_files/package_spec/build_archive.py
doc/python_api/sphinx_doc_gen.py
release/scripts/modules/animsys_refactor.py
release/scripts/modules/bpyml.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/space_view3d.py
source/tests/pep8.py

index f6aa6390e8c0d8f494b73dc1c92a10ea7c2f9b05..6913ed2dab007038773499a9a468e1db9329603f 100644 (file)
@@ -1,6 +1,8 @@
 # -*- python -*-
 # ex: set syntax=python:
 
+# <pep8 compliant>
+
 # Dictionary that the buildmaster pays attention to.
 c = BuildmasterConfig = {}
 
@@ -36,12 +38,12 @@ c['change_source'] = SVNPoller(
 # only take place on one slave.
 
 from buildbot.process.factory import BuildFactory
-from buildbot.steps.source import SVN 
+from buildbot.steps.source import SVN
 from buildbot.steps.shell import ShellCommand
 from buildbot.steps.shell import Compile
 from buildbot.steps.shell import Test
 from buildbot.steps.transfer import FileUpload
-from buildbot.steps.transfer import FileDownload
+from buildbot.steps.transfer import FileDownload
 from buildbot.steps.master import MasterShellCommand
 from buildbot.config import BuilderConfig
 
@@ -50,6 +52,7 @@ from buildbot.config import BuilderConfig
 c['builders'] = []
 buildernames = []
 
+
 def add_builder(c, name, libdir, factory):
     slavenames = []
 
@@ -64,15 +67,18 @@ def add_builder(c, name, libdir, factory):
 
 # common steps
 
+
 def svn_step():
     return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
 
+
 def lib_svn_step(dir):
     return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
 
 # generic builder
 
-def generic_builder(id, libdir=''):
+
+def generic_builder(id, libdir=""):
     filename = 'buildbot_upload_' + id + '.zip'
     compile_script = '../blender/build_files/buildbot/slave_compile.py'
     test_script = '../blender/build_files/buildbot/slave_test.py'
@@ -88,9 +94,9 @@ def generic_builder(id, libdir=''):
     f.addStep(Test(command=['python', test_script, id]))
     f.addStep(ShellCommand(name='package', command=['python', pack_script, id], description='packaging', descriptionDone='packaged'))
     if id.find('cmake') != -1:
-        f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100*1024*1024))
+        f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
     else:
-        f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100*1024*1024, workdir='install'))
+        f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024, workdir='install'))
     f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked'))
     return f
 
@@ -107,7 +113,7 @@ add_builder(c, 'win32_scons', 'windows', generic_builder)
 #
 # Decide how to react to incoming changes.
 
-from buildbot.scheduler import Scheduler
+from buildbot.scheduler import Scheduler
 from buildbot.schedulers import timed
 
 c['schedulers'] = []
@@ -132,18 +138,18 @@ c['schedulers'].append(timed.Nightly(name='nightly',
 c['status'] = []
 
 from buildbot.status import html
-from buildbot.status.web import auth, authz
+from buildbot.status.web import authz
 
-authz_cfg=authz.Authz(
+authz_cfg = authz.Authz(
     # change any of these to True to enable; see the manual for more
     # options
-    gracefulShutdown = False,
-    forceBuild = True, # use this to test your slave once it is set up
-    forceAllBuilds = False,
-    pingBuilder = False,
-    stopBuild = False,
-    stopAllBuilds = False,
-    cancelPendingBuild = False,
+    gracefulShutdown=False,
+    forceBuild=True,  # use this to test your slave once it is set up
+    forceAllBuilds=False,
+    pingBuilder=False,
+    stopBuild=False,
+    stopAllBuilds=False,
+    cancelPendingBuild=False,
 )
 
 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
@@ -168,4 +174,3 @@ c['buildbotURL'] = "http://builder.blender.org/"
 # installations.
 
 c['db_url'] = "sqlite:///state.sqlite"
-
index 5e0c6beb96269e6c6a5c2fa581deb0d4595e78be..f97e53384b0e613fcb9030dfaed2b37c26d55aeb 100644 (file)
@@ -19,6 +19,8 @@
 # Runs on Buildbot master, to unpack incoming unload.zip into latest
 # builds directory and remove older builds.
 
+# <pep8 compliant>
+
 import os
 import shutil
 import sys
index 708c2951272606054b000dc2d819fe433810bc26..54150a93e61dcbfdc344ff5b1fb3685af6cda31b 100644 (file)
@@ -16,6 +16,8 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
+# <pep8 compliant>
+
 import os
 import subprocess
 import sys
@@ -56,4 +58,3 @@ else:
 
     retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
     sys.exit(retcode)
-
index 12171cf4003e2e5c711c2cbc4c637d4c0752f033..74d00bf9249235f1bb0df8f55a0b4444dc7d1977 100644 (file)
@@ -16,6 +16,8 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
+# <pep8 compliant>
+
 # Runs on buildbot slave, creating a release package using the build
 # system and zipping it into buildbot_upload.zip. This is then uploaded
 # to the master in the next buildbot step.
@@ -83,4 +85,3 @@ try:
 except Exception, ex:
     sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
     sys.exit(1)
-
index 7e78f1ab5cddd6a62d626be7c515f8cad31258c9..f79ef7cf5c6a9d1cc5ca163c79bf216ac7a31673 100644 (file)
@@ -16,7 +16,8 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
-import os
+# <pep8 compliant>
+
 import subprocess
 import sys
 
@@ -37,4 +38,3 @@ if builder.find('cmake') != -1:
 else:
     # scons
     pass
-
index cf1da2f666f1209e16f38c519800a47d533a23bb..1bad1835434bd5ba0916efbc8528095697373a1c 100644 (file)
@@ -126,7 +126,6 @@ def cmake_advanced_info():
     defines = []
 
     import os
-    import sys
 
     create_eclipse_project(CMAKE_DIR)
 
index 2496c2295eb4dd623eb1f58c7ee85a5fe485122f..0329d16b1ec40609df251fca1691377209c47c31 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/python
 
+# <pep8 compliant>
+
 import os
 import shutil
 import subprocess
index bc190231e364b6c8eab6ffdb2ba4daad93c08e72..b479b19c2979f95f5e47ae45ea48669ae1d6c64b 100644 (file)
@@ -110,6 +110,7 @@ if _BPY_PROP_COLLECTION_FAKE:
 else:
     _BPY_PROP_COLLECTION_ID = "collection"
 
+
 def undocumented_message(module_name, type_name, identifier):
     if str(type_name).startswith('<module'):
         preloadtitle = '%s.%s' % (module_name, identifier)
index 9f2acc5e26814974a66f1f7e097f116cf06dc7e8..5336a8b2b3550dcf744e860eb22a9849a64b010b 100644 (file)
@@ -27,10 +27,12 @@ The main function to use is: update_data_paths(...)
 
 IS_TESTING = False
 
+
 def drepr(string):
     # is there a less crappy way to do this in python?, re.escape also escapes
     # single quotes strings so cant use it.
-    return '"%s"' % repr(string)[1:-1].replace("\"", "\\\"").replace("\\'","'")
+    return '"%s"' % repr(string)[1:-1].replace("\"", "\\\"").replace("\\'", "'")
+
 
 class DataPathBuilder(object):
     __slots__ = ("data_path", )
@@ -185,7 +187,7 @@ def update_data_paths(rna_update):
                 if data_path_new != data_path:
                     if not IS_TESTING:
                         fcurve.data_path = data_path_new
-                        fcurve.driver.is_valid = True; # reset to allow this to work again
+                        fcurve.driver.is_valid = True  # reset to allow this to work again
                     print("driver-fcurve (%s): %s -> %s" % (id_data.name, data_path, data_path_new))
 
                 for var in fcurve.driver.variables:
index f1f72d50fd2e2b1a29fd1de496f634720083ed11..fdf5172a0b3597418369c0a31dcc80a396ed1d0e 100644 (file)
@@ -160,9 +160,9 @@ if __name__ == "__main__":
     from bpyml_test import *
 
     draw = [
-         ui() [
-            split() [
-                column() [
+         ui()[
+            split()[
+                column()[
                     prop(data='context.scene.render', property='use_stamp_time', text='Time'),
                     prop(data='context.scene.render', property='use_stamp_date', text='Date'),
                     prop(data='context.scene.render', property='use_stamp_render_time', text='RenderTime'),
@@ -173,7 +173,7 @@ if __name__ == "__main__":
                     prop(data='context.scene.render', property='use_stamp_marker', text='Marker'),
                     prop(data='context.scene.render', property='use_stamp_sequencer_strip', text='Seq. Strip')
                 ],
-                column() [
+                column()[
                     active(expr='context.scene.render.use_stamp'),
                     prop(data='context.scene.render', property='stamp_foreground', slider=True),
                     prop(data='context.scene.render', property='stamp_background', slider=True),
@@ -181,9 +181,9 @@ if __name__ == "__main__":
                     prop(data='context.scene.render', property='stamp_font_size', text='Font Size')
                 ]
             ],
-            split(percentage=0.2) [
+            split(percentage=0.2)[
                 prop(data='context.scene.render', property='use_stamp_note', text='Note'),
-                row() [
+                row()[
                     active(expr='context.scene.render.use_stamp_note'),
                     prop(data='context.scene.render', property='stamp_note_text', text='')
                 ]
index 7aa1dee2721beecf6ab02ce075f49ae17391b269..4823d36563368160e5fd92b881ab7541c9b6c64d 100644 (file)
@@ -20,6 +20,7 @@
 import bpy
 from rna_prop_ui import PropertyPanel
 
+
 class ArmatureButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
@@ -264,6 +265,7 @@ from bl_ui.properties_animviz import (
     OnionSkinButtonsPanel,
     )
 
+
 class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
     #bl_label = "Bones Motion Paths"
     bl_context = "data"
index a2ba09486699e37b6c6be68db788b4e5284d5633..22d630643c927d5953373c988dead5d0aa5bcee4 100644 (file)
@@ -1161,8 +1161,8 @@ class VIEW3D_MT_pose(bpy.types.Menu):
         layout.menu("VIEW3D_MT_transform")
 
         layout.menu("VIEW3D_MT_pose_transform")
-        layout.menu("VIEW3D_MT_pose_apply")    
-               
+        layout.menu("VIEW3D_MT_pose_apply")
+
         layout.menu("VIEW3D_MT_snap")
 
         layout.separator()
index 3872d169a9aee5b32180663969f7c364dd7c3cf9..67ef12261d0eb1b8fa1d17c49d82c8a267515392 100644 (file)
@@ -42,7 +42,7 @@ SKIP_PREFIX = "./tools", "./config", "./scons", "./extern"
 def file_list_py(path):
     for dirpath, dirnames, filenames in os.walk(path):
         for filename in filenames:
-            if filename.endswith(".py"):
+            if filename.endswith(".py") or filename.endswith(".cfg"):
                 yield os.path.join(dirpath, filename)