pep8 compliance, also removed use of exec() for netrender module importing
authorCampbell Barton <ideasman42@gmail.com>
Thu, 19 Nov 2009 23:59:37 +0000 (23:59 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 19 Nov 2009 23:59:37 +0000 (23:59 +0000)
release/scripts/io/netrender/client.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/space_console.py

index 9a28fb2f7a9e0b6b2e1f1e8560d6fc4802866296..8fdedde3f52fa05ff38cb88d6b46f297b42abdf6 100644 (file)
@@ -257,10 +257,8 @@ class NetworkRenderEngine(bpy.types.RenderEngine):
                        conn.close()
 
 def compatible(module):
                        conn.close()
 
 def compatible(module):
-       exec("import " + module)
-       module = eval(module)
-       for member in dir(module):
-               subclass = getattr(module, member)
+       module = __import__(module)
+       for subclass in module.__dict__.values():
                try:            subclass.COMPAT_ENGINES.add('NET_RENDER')
                except: pass
        del module
                try:            subclass.COMPAT_ENGINES.add('NET_RENDER')
                except: pass
        del module
index 8e863c3db313ee4e02b185ed28f855200b4ad6d6..e563c7e1fe5da9fc0cab89d4b01aa570ef9fb40a 100644 (file)
@@ -103,7 +103,7 @@ class DATA_PT_shape_curve(DataButtonsPanel):
         if is_text:
             col.itemL(text="Display:")
             col.itemR(curve, "fast", text="Fast Editing")
         if is_text:
             col.itemL(text="Display:")
             col.itemR(curve, "fast", text="Fast Editing")
-        
+
         if wide_ui:
             col = split.column()
         
         if wide_ui:
             col = split.column()
         
@@ -261,6 +261,7 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
             col = split.column()
             col.itemR(act_spline, "smooth")
 
             col = split.column()
             col.itemR(act_spline, "smooth")
 
+
 class DATA_PT_font(DataButtonsPanel):
     bl_label = "Font"
     
 class DATA_PT_font(DataButtonsPanel):
     bl_label = "Font"
     
@@ -350,6 +351,7 @@ class DATA_PT_paragraph(DataButtonsPanel):
 
 class DATA_PT_textboxes(DataButtonsPanel):
     bl_label = "Text Boxes"
 
 class DATA_PT_textboxes(DataButtonsPanel):
     bl_label = "Text Boxes"
+
     def poll(self, context):
         return (context.object and context.object.type == 'TEXT' and context.curve)
         
     def poll(self, context):
         return (context.object and context.object.type == 'TEXT' and context.curve)
         
index c90e6c50bd993c67e1c5405ba9ae5fec0503a566..631c91a5487403b7964682498d2182ffee8b5b4b 100644 (file)
@@ -82,7 +82,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
                 col.itemR(domain, "maxres", text="Divisions")
 
                 if wide_ui:
                 col.itemR(domain, "maxres", text="Divisions")
 
                 if wide_ui:
-                     col = split.column()
+                    col = split.column()
                 col.itemL(text="Behavior:")
                 col.itemR(domain, "alpha")
                 col.itemR(domain, "beta")
                 col.itemL(text="Behavior:")
                 col.itemR(domain, "alpha")
                 col.itemR(domain, "beta")
@@ -108,7 +108,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
                         col = split.column()
                 else:
                     if wide_ui:
                         col = split.column()
                 else:
                     if wide_ui:
-                       col = split.column()
+                        col = split.column()
                     col.itemL(text="Behavior:")
                     col.itemR(flow, "temperature")
                     col.itemR(flow, "density")
                     col.itemL(text="Behavior:")
                     col.itemR(flow, "temperature")
                     col.itemR(flow, "density")
index 8aa4df7b16a2d21292f8d691e48445dc8279556f..e4d65e8eff6f44c5d6494c45a9ee2a96c255ce1a 100644 (file)
@@ -141,7 +141,7 @@ class ConsoleAutocomplete(bpy.types.Operator):
 
     def execute(self, context):
         sc = context.space_data
 
     def execute(self, context):
         sc = context.space_data
-        module =  __import__("console_" + sc.language)
+        module = __import__("console_" + sc.language)
         autocomplete = getattr(module, "autocomplete", None)
 
         if autocomplete:
         autocomplete = getattr(module, "autocomplete", None)
 
         if autocomplete: