[Bf-blender-cvs] [cd02fe5d705] master: Cleanup: remove underscore prefix for used vars

Campbell Barton noreply at git.blender.org
Mon Aug 5 04:48:23 CEST 2019


Commit: cd02fe5d70506539800c50544dc75a9ae1c72b9d
Author: Campbell Barton
Date:   Mon Aug 5 12:47:55 2019 +1000
Branches: master
https://developer.blender.org/rBcd02fe5d70506539800c50544dc75a9ae1c72b9d

Cleanup: remove underscore prefix for used vars

Also remove unused vars.

===================================================================

M	release/scripts/startup/bl_ui/space_clip.py
M	release/scripts/startup/bl_ui/space_text.py
M	release/scripts/startup/bl_ui/space_topbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index ff2dfca6cf8..37c76bf327c 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -1442,10 +1442,10 @@ class CLIP_MT_tracking_context_menu(Menu):
     def poll(cls, context):
         return context.space_data.clip
 
-    def draw(self, _context):
+    def draw(self, context):
         layout = self.layout
 
-        mode = _context.space_data.mode
+        mode = context.space_data.mode
 
         if mode == 'TRACKING':
 
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 534561efab4..7a50b690ad8 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -129,10 +129,10 @@ class TEXT_PT_properties(Panel):
             flow.active = False
         row = flow.row(align=True)
         st = context.space_data
-        row.prop(st, "show_margin", text = "Margin")
+        row.prop(st, "show_margin", text="Margin")
         rowsub = row.row()
         rowsub.active = st.show_margin
-        rowsub.prop(st, "margin_column", text = "")
+        rowsub.prop(st, "margin_column", text="")
 
         flow.prop(st, "font_size")
         flow.prop(st, "tab_width")
@@ -285,8 +285,6 @@ class TEXT_MT_format(Menu):
 
     def draw(self, _context):
         layout = self.layout
-        st = _context.space_data
-        text = st.text
 
         layout.operator("text.indent")
         layout.operator("text.unindent")
@@ -321,12 +319,11 @@ class TEXT_MT_edit(Menu):
 
     @classmethod
     def poll(cls, context):
-        return (context.space_data.text)
+        return context.space_data.text is not None
 
-    def draw(self, _context):
+    def draw(self, context):
         layout = self.layout
-        st = _context.space_data
-        text = st.text
+        st = context.space_data
 
         layout.operator("ed.undo")
         layout.operator("ed.redo")
@@ -369,8 +366,6 @@ class TEXT_MT_toolbox(Menu):
 
     def draw(self, _context):
         layout = self.layout
-        st = _context.space_data
-        text = st.text
 
         layout.operator_context = 'INVOKE_DEFAULT'
 
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index a3382908ea1..f735e7b770f 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -154,10 +154,10 @@ class TOPBAR_MT_editor_menus(Menu):
     bl_idname = "TOPBAR_MT_editor_menus"
     bl_label = ""
 
-    def draw(self, _context):
+    def draw(self, context):
         layout = self.layout
 
-        if _context.area.show_menus:
+        if context.area.show_menus:
             layout.menu("TOPBAR_MT_app", text="", icon='BLENDER')
         else:
             layout.menu("TOPBAR_MT_app", text="Blender")



More information about the Bf-blender-cvs mailing list