minor pep8 edits, also added 'test_pep8' & 'test_cmake' to the GNUmakefile for conven...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 10 Apr 2011 10:45:56 +0000 (10:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 10 Apr 2011 10:45:56 +0000 (10:45 +0000)
GNUmakefile
build_files/cmake/cmake_qtcreator_project.py
doc/python_api/sphinx_changelog_gen.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_ui/space_nla.py
release/scripts/startup/keyingsets_builtins.py
source/tests/pep8.py

index 42d7c33e46b73c1025cd5e23ec2c0360b8c19143..73d5c2677055f0383bf68a81ea59658cb42cad52 100644 (file)
@@ -98,6 +98,16 @@ package_archive:
 test:
        cd $(BUILD_DIR) ; ctest . --output-on-failure
 
+# run pep8 check check on scripts we distribute.
+test_pep8:
+       python source/tests/pep8.py > test_pep8.log 2>&1
+       @echo "written: test_pep8.log"
+
+# run some checks on our cmakefiles.
+test_cmake:
+       python build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
+       @echo "written: test_cmake_consistency.txt"
+
 clean:
        cd $(BUILD_DIR) ; make clean
 
index 85d37549917e9f0fe7e730363c8c2eb6a28b0d5d..59b8b2a3b02669140e2231f3fea028f27364a6f4 100644 (file)
@@ -125,7 +125,6 @@ def cmake_advanced_info():
     includes = []
     defines = []
 
-
     create_eclipse_project(CMAKE_DIR)
 
     from xml.dom.minidom import parse
index 4305157bd78b0660681a8fddb245d7cccad6720b..eb4fc4716e610f7e9dc9c0c2b76e472300861db6 100644 (file)
@@ -34,7 +34,7 @@ blender --background --python intern/tools/rna_api_dump.py -- \
 
 
 # Api comparison can also run without blender
-python intern/tools/rna_api_dump.py 
+python intern/tools/rna_api_dump.py
         --api_from blender_api_2_56_6.py \
         --api_to blender_api_2_57.py \
         --api_out changes.rst
@@ -252,7 +252,6 @@ def api_changelog(api_from, api_to, api_out):
                         if args_new != args_old:
                             func_args.append((prop_id, args_old, args_new))
 
-
             if props_moved or set_props_new or set_props_old or func_args:
                 props_moved.sort()
                 props_new[:] = sorted(set_props_new)
@@ -262,10 +261,6 @@ def api_changelog(api_from, api_to, api_out):
                 api_changes.append((mod_id, class_id, props_moved, props_new, props_old, func_args))
 
     # also document function argument changes
-    
-
-
-
 
     fout = open(api_out, 'w')
     fw = fout.write
@@ -298,7 +293,7 @@ def api_changelog(api_from, api_to, api_out):
             for prop_id_old, prop_id in props_moved:
                 fw("* **%s** -> :class:`%s.%s.%s`\n" % (prop_id_old, mod_id, class_name, prop_id))
             fw("\n")
-            
+
         if func_args:
             write_title("Function Arguments", "^")
             for func_id, args_old, args_new in func_args:
@@ -313,14 +308,13 @@ def api_changelog(api_from, api_to, api_out):
 def main():
     import sys
     import os
-    
+
     try:
         import argparse
     except:
         print("Old Blender, just dumping")
         api_dump()
         return
-        
 
     argv = sys.argv
 
index c3de0a289a36f30eed63a07447ba5ca5687b33cf..94074a52cd63483b979607686e04ced93253a8a5 100644 (file)
@@ -163,7 +163,7 @@ class MakeSmoke(bpy.types.Operator):
         # create a volume material with a voxel data texture for the domain
         bpy.ops.object.material_slot_add({"object": obj})
 
-        mat = bpy.data.materials.new("Smoke Domain Material");
+        mat = bpy.data.materials.new("Smoke Domain Material")
         obj.material_slots[0].material = mat
         mat.type = 'VOLUME'
         mat.volume.density = 0
@@ -274,8 +274,8 @@ class MakeFluid(bpy.types.Operator):
 
         # create a ray-transparent material for the domain
         bpy.ops.object.material_slot_add({"object": obj})
-        
-        mat = bpy.data.materials.new("Fluid Domain Material");
+
+        mat = bpy.data.materials.new("Fluid Domain Material")
         obj.material_slots[0].material = mat
 
         mat.specular_intensity = 1
index 5c8e8cd9173b2be10bfa45297c7a81602ed94f96..717adb3baa8a0c5efdbd77309972a760e2c8d8f9 100644 (file)
@@ -188,7 +188,7 @@ class NLA_MT_edit_transform(bpy.types.Menu):
         layout.column()
         layout.operator("transform.translate", text="Grab/Move")
         layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
-        layout.operator("transform.transform", text="Scale").mode= 'TIME_SCALE'
+        layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index cefc5cf38ed52771ba12d65bec465b701c993bdf..0775d38c437d497812566a6648b37c42446c4fbb 100644 (file)
@@ -359,10 +359,11 @@ class BUILTIN_KSI_WholeCharacter(bpy.types.KeyingSetInfo):
 
 ###############################
 
+
 # Delta Location
 class BUILTIN_KSI_DeltaLocation(bpy.types.KeyingSetInfo):
     bl_label = "Delta Location"
-    
+
     # poll - selected objects only (and only if active object in object mode)
     poll = keyingsets_utils.RKS_POLL_selected_objects
 
@@ -387,7 +388,7 @@ class BUILTIN_KSI_DeltaLocation(bpy.types.KeyingSetInfo):
 # Delta Rotation
 class BUILTIN_KSI_DeltaRotation(bpy.types.KeyingSetInfo):
     bl_label = "Delta Rotation"
-    
+
     # poll - selected objects only (and only if active object in object mode)
     poll = keyingsets_utils.RKS_POLL_selected_objects
 
@@ -406,7 +407,7 @@ class BUILTIN_KSI_DeltaRotation(bpy.types.KeyingSetInfo):
         elif data.rotation_mode == 'AXIS_ANGLE':
             # XXX: for now, this is not available yet
             #path = path_add_property(base_path, "delta_rotation_axis_angle")
-            return;
+            return
         else:
             path = keyingsets_utils.path_add_property(base_path, "delta_rotation_euler")
 
@@ -415,12 +416,12 @@ class BUILTIN_KSI_DeltaRotation(bpy.types.KeyingSetInfo):
             ks.paths.add(id_block, path, group_method='NAMED', group_name=grouping)
         else:
             ks.paths.add(id_block, path)
-    
+
 
 # Delta Scale
 class BUILTIN_KSI_DeltaScale(bpy.types.KeyingSetInfo):
     bl_label = "Delta Scale"
-    
+
     # poll - selected objects only (and only if active object in object mode)
     poll = keyingsets_utils.RKS_POLL_selected_objects
 
index 67ef12261d0eb1b8fa1d17c49d82c8a267515392..f7c416553b203f72ed0aff57a43b8bae51902e72 100644 (file)
@@ -31,7 +31,7 @@ import os
 # in debian install pylint pyflakes pep8 with apt-get/aptitude/etc
 #
 # on *nix run
-#   python source/tests/pep8.py > pep8_error.txt 2>&1
+#   python source/tests/pep8.py > test_pep8.log 2>&1
 
 # how many lines to read into the file, pep8 comment
 # should be directly after the licence header, ~20 in most cases