Cleanup: unused argument & variable warnings
This commit is contained in:
parent
3bf98d1cec
commit
013fc69ea8
|
@ -1572,7 +1572,7 @@ class I18n:
|
|||
if not os.path.isfile(dst):
|
||||
print("WARNING: trying to write as python code into {}, which is not a file! Aborting.".format(dst))
|
||||
return
|
||||
prev, txt, nxt, has_trans = self._parser_check_file(dst)
|
||||
prev, txt, nxt, _has_trans = self._parser_check_file(dst)
|
||||
if prev is None and nxt is None:
|
||||
print("WARNING: Looks like given python file {} has no auto-generated translations yet, will be added "
|
||||
"at the end of the file, you can move that section later if needed...".format(dst))
|
||||
|
|
|
@ -71,7 +71,7 @@ def rtl_process_po(args, settings):
|
|||
po.write(kind="PO", dest=args.dst)
|
||||
|
||||
|
||||
def language_menu(args, settings):
|
||||
def language_menu(_args, settings):
|
||||
# 'DEFAULT' and en_US are always valid, fully-translated "languages"!
|
||||
stats = {"DEFAULT": 1.0, "en_US": 1.0}
|
||||
|
||||
|
|
|
@ -84,10 +84,10 @@ def protect_format_seq(msg):
|
|||
# LRM = "\u200E"
|
||||
# RLM = "\u200F"
|
||||
LRE = "\u202A"
|
||||
RLE = "\u202B"
|
||||
# RLE = "\u202B"
|
||||
PDF = "\u202C"
|
||||
LRO = "\u202D"
|
||||
RLO = "\u202E"
|
||||
# RLO = "\u202E"
|
||||
# uctrl = {LRE, RLE, PDF, LRO, RLO}
|
||||
# Most likely incomplete, but seems to cover current needs.
|
||||
format_codes = set("tslfd")
|
||||
|
|
|
@ -240,7 +240,7 @@ def RKS_GEN_custom_props(_ksi, _context, ks, data):
|
|||
prop_path = '["%s"]' % bpy.utils.escape_identifier(cprop_name)
|
||||
try:
|
||||
rna_property = data.path_resolve(prop_path, False)
|
||||
except ValueError as ex:
|
||||
except ValueError:
|
||||
# This happens when a custom property is set to None. In that case it cannot
|
||||
# be converted to an FCurve-compatible value, so we can't keyframe it anyway.
|
||||
continue
|
||||
|
|
|
@ -23,7 +23,7 @@ from bpy.app.handlers import persistent
|
|||
|
||||
|
||||
@persistent
|
||||
def load_handler(dummy):
|
||||
def load_handler(_):
|
||||
import bpy
|
||||
|
||||
# 2D Animation
|
||||
|
|
|
@ -21,7 +21,7 @@ from bpy.app.handlers import persistent
|
|||
|
||||
|
||||
@persistent
|
||||
def load_handler(dummy):
|
||||
def load_handler(_):
|
||||
import bpy
|
||||
# Apply subdivision modifier on startup
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
|
|
|
@ -21,7 +21,7 @@ from bpy.app.handlers import persistent
|
|||
|
||||
|
||||
@persistent
|
||||
def load_handler(dummy):
|
||||
def load_handler(_):
|
||||
from bpy import context
|
||||
screen = context.screen
|
||||
for area in screen.areas:
|
||||
|
|
|
@ -614,9 +614,7 @@ class USERPREF_PT_system_os_settings(SystemPanel, CenterAlignMixIn, Panel):
|
|||
import sys
|
||||
return sys.platform[:3] == "win"
|
||||
|
||||
def draw_centered(self, context, layout):
|
||||
prefs = context.preferences
|
||||
|
||||
def draw_centered(self, _context, layout):
|
||||
layout.label(text="Make this installation your default Blender")
|
||||
split = layout.split(factor=0.4)
|
||||
split.alignment = 'RIGHT'
|
||||
|
|
|
@ -4017,7 +4017,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
|
|||
class VIEW3D_MT_edit_mesh_edges_data(Menu):
|
||||
bl_label = "Edge Data"
|
||||
|
||||
def draw(self, context):
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
|
|
|
@ -532,7 +532,7 @@ class WholeCharacterMixin:
|
|||
prop_path = '["%s"]' % bpy.utils.escape_identifier(prop)
|
||||
try:
|
||||
rna_property = bone.path_resolve(prop_path, False)
|
||||
except ValueError as ex:
|
||||
except ValueError:
|
||||
# This happens when a custom property is set to None. In that case it cannot
|
||||
# be converted to an FCurve-compatible value, so we can't keyframe it anyway.
|
||||
continue
|
||||
|
@ -582,7 +582,7 @@ class BUILTIN_KSI_DeltaLocation(KeyingSetInfo):
|
|||
iterator = keyingsets_utils.RKS_ITER_selected_objects
|
||||
|
||||
# generator - delta location channels only
|
||||
def generate(self, context, ks, data):
|
||||
def generate(self, _context, ks, data):
|
||||
# get id-block and path info
|
||||
id_block, base_path, grouping = keyingsets_utils.get_transform_generators_base_info(data)
|
||||
|
||||
|
@ -608,7 +608,7 @@ class BUILTIN_KSI_DeltaRotation(KeyingSetInfo):
|
|||
iterator = keyingsets_utils.RKS_ITER_selected_objects
|
||||
|
||||
# generator - delta location channels only
|
||||
def generate(self, context, ks, data):
|
||||
def generate(self, _context, ks, data):
|
||||
# get id-block and path info
|
||||
id_block, base_path, grouping = keyingsets_utils.get_transform_generators_base_info(data)
|
||||
|
||||
|
@ -642,7 +642,7 @@ class BUILTIN_KSI_DeltaScale(KeyingSetInfo):
|
|||
iterator = keyingsets_utils.RKS_ITER_selected_objects
|
||||
|
||||
# generator - delta location channels only
|
||||
def generate(self, context, ks, data):
|
||||
def generate(self, _context, ks, data):
|
||||
# get id-block and path info
|
||||
id_block, base_path, grouping = keyingsets_utils.get_transform_generators_base_info(data)
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue