Cleanup: use static sets for comparison, quiet unused arg warnings

This commit is contained in:
Campbell Barton 2022-01-07 14:39:01 +11:00
parent f48164b5ea
commit 2cd8238ce3
8 changed files with 14 additions and 14 deletions

View File

@ -382,7 +382,7 @@ class DOPESHEET_MT_view(Menu):
class DOPESHEET_MT_view_pie(Menu):
bl_label = "View"
def draw(self, context):
def draw(self, _context):
layout = self.layout
pie = layout.menu_pie()
@ -544,7 +544,7 @@ class DopesheetActionPanelBase:
bl_label = "Action"
@classmethod
def draw_generic_panel(cls, context, layout, action):
def draw_generic_panel(cls, _context, layout, action):
layout.label(text=action.name, icon='ACTION')
layout.prop(action, "use_frame_range")

View File

@ -847,7 +847,7 @@ classes = (
ASSETBROWSER_MT_context_menu,
)
def asset_path_str_get(self):
def asset_path_str_get(_self):
asset_file_handle = bpy.context.asset_file_handle
if asset_file_handle is None:
return ""

View File

@ -344,7 +344,7 @@ class GRAPH_MT_slider(Menu):
def draw(self, _context):
layout = self.layout
layout.operator("graph.breakdown", text="Breakdown")
layout.operator("graph.blend_to_neighbor", text="Blend To Neighbor")
@ -352,7 +352,7 @@ class GRAPH_MT_slider(Menu):
class GRAPH_MT_view_pie(Menu):
bl_label = "View"
def draw(self, context):
def draw(self, _context):
layout = self.layout
pie = layout.menu_pie()

View File

@ -266,7 +266,7 @@ class NLA_MT_snap_pie(Menu):
class NLA_MT_view_pie(Menu):
bl_label = "View"
def draw(self, context):
def draw(self, _context):
layout = self.layout
pie = layout.menu_pie()

View File

@ -370,7 +370,7 @@ class NODE_MT_node(Menu):
class NODE_MT_view_pie(Menu):
bl_label = "View"
def draw(self, context):
def draw(self, _context):
layout = self.layout
pie = layout.menu_pie()

View File

@ -1162,7 +1162,7 @@ class SEQUENCER_MT_pivot_pie(Menu):
class SEQUENCER_MT_view_pie(Menu):
bl_label = "View"
def draw(self, context):
def draw(self, _context):
layout = self.layout
pie = layout.menu_pie()
@ -1173,7 +1173,7 @@ class SEQUENCER_MT_view_pie(Menu):
class SEQUENCER_MT_preview_view_pie(Menu):
bl_label = "View"
def draw(self, context):
def draw(self, _context):
layout = self.layout
pie = layout.menu_pie()
@ -1229,7 +1229,7 @@ class SEQUENCER_PT_color_tag_picker(SequencerColorTagPicker, Panel):
bl_category = "Strip"
bl_options = {'HIDE_HEADER', 'INSTANCED'}
def draw(self, context):
def draw(self, _context):
layout = self.layout
row = layout.row(align=True)
@ -1242,7 +1242,7 @@ class SEQUENCER_PT_color_tag_picker(SequencerColorTagPicker, Panel):
class SEQUENCER_MT_color_tag_picker(SequencerColorTagPicker, Menu):
bl_label = "Set Color Tag"
def draw(self, context):
def draw(self, _context):
layout = self.layout
row = layout.row(align=True)

View File

@ -6519,7 +6519,7 @@ class VIEW3D_PT_overlay_bones(Panel):
mode = context.mode
if mode in ('POSE', 'PAINT_WEIGHT'):
if mode in {'POSE', 'PAINT_WEIGHT'}:
armature = context.pose_object
elif mode == 'EDIT_ARMATURE':
armature = context.edit_object
@ -6534,7 +6534,7 @@ class VIEW3D_PT_overlay_bones(Panel):
return (
(mode == 'POSE') or
(mode == 'PAINT_WEIGHT' and context.pose_object) or
(mode in ('EDIT_ARMATURE', 'OBJECT') and
(mode in {'EDIT_ARMATURE', 'OBJECT'} and
VIEW3D_PT_overlay_bones.is_using_wireframe(context))
)

View File

@ -66,7 +66,7 @@ class GeometryNodeCategory(SortedNodeCategory):
# menu entry for node group tools
def group_tools_draw(self, layout, _context):
def group_tools_draw(_self, layout, _context):
layout.operator("node.group_make")
layout.operator("node.group_ungroup")
layout.separator()