Cleanup: quiet pylint's inconsistent-return-statements warning
No functional changes as the return value either relied on None evaluating to False or wasn't used.
This commit is contained in:
parent
6482f9fffe
commit
14905cd1d5
|
@ -488,7 +488,7 @@ class CLIP_OT_constraint_to_fcurve(Operator):
|
|||
efra = max(efra, track.markers[-1].frame)
|
||||
|
||||
if sfra is None or efra is None:
|
||||
return
|
||||
return {'CANCELLED'}
|
||||
|
||||
# Store object matrices.
|
||||
for x in range(sfra, efra + 1):
|
||||
|
@ -516,6 +516,8 @@ class CLIP_OT_constraint_to_fcurve(Operator):
|
|||
|
||||
scene.frame_set(frame_current)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
def execute(self, context):
|
||||
scene = context.scene
|
||||
# XXX, should probably use context.selected_editable_objects
|
||||
|
|
|
@ -37,6 +37,7 @@ def physics_add(layout, md, name, type, typeicon, toggles):
|
|||
text_ctxt=i18n_contexts.default,
|
||||
icon=typeicon,
|
||||
).type = type
|
||||
return None
|
||||
|
||||
|
||||
def physics_add_special(layout, data, name, addop, removeop, typeicon):
|
||||
|
|
|
@ -82,8 +82,7 @@ class PhysicButtonsPanel:
|
|||
|
||||
md = context.fluid
|
||||
flow = md.flow_settings
|
||||
if (flow.flow_behavior == 'OUTFLOW'):
|
||||
return True
|
||||
return (flow.flow_behavior == 'OUTFLOW')
|
||||
|
||||
@staticmethod
|
||||
def poll_fluid_flow_liquid(context):
|
||||
|
@ -92,8 +91,7 @@ class PhysicButtonsPanel:
|
|||
|
||||
md = context.fluid
|
||||
flow = md.flow_settings
|
||||
if (flow.flow_type == 'LIQUID'):
|
||||
return True
|
||||
return (flow.flow_type == 'LIQUID')
|
||||
|
||||
|
||||
class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
|
||||
|
|
|
@ -1079,10 +1079,11 @@ class CLIP_PT_2d_cursor(Panel):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
sc = context.space_data
|
||||
if not CLIP_PT_clip_view_panel.poll(context):
|
||||
return False
|
||||
|
||||
if CLIP_PT_clip_view_panel.poll(context):
|
||||
return sc.pivot_point == 'CURSOR' or sc.mode == 'MASK'
|
||||
sc = context.space_data
|
||||
return sc.pivot_point == 'CURSOR' or sc.mode == 'MASK'
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
|
|
@ -451,6 +451,7 @@ class _defs_view3d_add:
|
|||
for item in km.keymap_items:
|
||||
if item.propvalue == propvalue:
|
||||
return item
|
||||
return None
|
||||
|
||||
if km is not None:
|
||||
kmi_snap = keymap_item_from_propvalue('SNAP_ON')
|
||||
|
|
|
@ -569,6 +569,8 @@ class _draw_tool_settings_context_mode:
|
|||
elif curves_tool == "SLIDE":
|
||||
layout.popover("VIEW3D_PT_tools_brush_falloff")
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class VIEW3D_HT_header(Header):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
|
|
Loading…
Reference in New Issue