diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/addon_utils.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/bl_app_override/helpers.py | 1 | ||||
-rw-r--r-- | release/scripts/modules/bl_app_template_utils.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/bpy/ops.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/bpy/utils/__init__.py | 1 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/io_utils.py | 12 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/mesh_utils.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/node_shader_utils.py | 5 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/object_utils.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/bpy_types.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/console_shell.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/keyingsets_utils.py | 14 | ||||
-rw-r--r-- | release/scripts/modules/nodeitems_utils.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 2 |
14 files changed, 30 insertions, 33 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py index dfd89d0e374..3ff296d0be9 100644 --- a/release/scripts/modules/addon_utils.py +++ b/release/scripts/modules/addon_utils.py @@ -295,7 +295,7 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non from bpy_restrict_state import RestrictBlend if handle_error is None: - def handle_error(ex): + def handle_error(_ex): import traceback traceback.print_exc() @@ -420,7 +420,7 @@ def disable(module_name, *, default_set=False, handle_error=None): import sys if handle_error is None: - def handle_error(ex): + def handle_error(_ex): import traceback traceback.print_exc() diff --git a/release/scripts/modules/bl_app_override/helpers.py b/release/scripts/modules/bl_app_override/helpers.py index a6f67f2d435..0a32e4b8b23 100644 --- a/release/scripts/modules/bl_app_override/helpers.py +++ b/release/scripts/modules/bl_app_override/helpers.py @@ -62,7 +62,6 @@ class AppOverrideState: self._ui_ignore_store = None def _setup_classes(self): - import bpy assert(self._class_store is None) self._class_store = self.class_ignore() from bpy.utils import unregister_class diff --git a/release/scripts/modules/bl_app_template_utils.py b/release/scripts/modules/bl_app_template_utils.py index c00ac6a50b1..42467d21580 100644 --- a/release/scripts/modules/bl_app_template_utils.py +++ b/release/scripts/modules/bl_app_template_utils.py @@ -54,7 +54,7 @@ def _enable(template_id, *, handle_error=None, ignore_not_found=False): from bpy_restrict_state import RestrictBlend if handle_error is None: - def handle_error(ex): + def handle_error(_ex): import traceback traceback.print_exc() @@ -107,7 +107,7 @@ def _disable(template_id, *, handle_error=None): """ if handle_error is None: - def handle_error(ex): + def handle_error(_ex): import traceback traceback.print_exc() diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py index f4e37ebc9a8..41fb0e411de 100644 --- a/release/scripts/modules/bpy/ops.py +++ b/release/scripts/modules/bpy/ops.py @@ -133,7 +133,7 @@ class BPyOpsSubModOp: is_dict = is_exec = is_undo = False - for i, arg in enumerate(args): + for arg in args: if is_dict is False and isinstance(arg, dict): if is_exec is True or is_undo is True: raise ValueError("dict arg must come first") @@ -169,7 +169,7 @@ class BPyOpsSubModOp: self._func = func def poll(self, *args): - C_dict, C_exec, C_undo = BPyOpsSubModOp._parse_args(args) + C_dict, C_exec, _C_undo = BPyOpsSubModOp._parse_args(args) return op_poll(self.idname_py(), C_dict, C_exec) def idname(self): diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index 7d4909fc7bc..86eea422cf9 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -162,7 +162,6 @@ def load_scripts(reload_scripts=False, refresh_scripts=False): """ use_time = use_class_register_check = _bpy.app.debug_python use_user = not _is_factory_startup - is_background = _bpy.app.background if use_time: import time diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index d7cca7cc896..96b9596a57d 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -69,7 +69,7 @@ class ExportHelper: # True == use ext, False == no ext, None == do nothing. check_extension = True - def invoke(self, context, event): + def invoke(self, context, _event): import os if not self.filepath: blend_filepath = context.blend_data.filepath @@ -83,7 +83,7 @@ class ExportHelper: context.window_manager.fileselect_add(self) return {'RUNNING_MODAL'} - def check(self, context): + def check(self, _context): import os change_ext = False change_axis = _check_axis_conversion(self) @@ -113,11 +113,11 @@ class ImportHelper: subtype='FILE_PATH', ) - def invoke(self, context, event): + def invoke(self, context, _event): context.window_manager.fileselect_add(self) return {'RUNNING_MODAL'} - def check(self, context): + def check(self, _context): return _check_axis_conversion(self) @@ -132,7 +132,7 @@ def orientation_helper(axis_forward='Y', axis_up='Z'): if "__annotations__" not in cls.__dict__: setattr(cls, "__annotations__", {}) - def _update_axis_forward(self, context): + def _update_axis_forward(self, _context): if self.axis_forward[-1] == self.axis_up[-1]: self.axis_up = (self.axis_up[0:-1] + 'XYZ'[('XYZ'.index(self.axis_up[-1]) + 1) % 3]) @@ -151,7 +151,7 @@ def orientation_helper(axis_forward='Y', axis_up='Z'): update=_update_axis_forward, ) - def _update_axis_up(self, context): + def _update_axis_up(self, _context): if self.axis_up[-1] == self.axis_forward[-1]: self.axis_forward = (self.axis_forward[0:-1] + 'XYZ'[('XYZ'.index(self.axis_forward[-1]) + 1) % 3]) diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index 98ddc731028..41727565cfa 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -116,7 +116,7 @@ def mesh_linked_triangles(mesh): while ok: ok = False - for i, t in enumerate(mesh.loop_triangles): + for t in mesh.loop_triangles: mapped_index = tri_mapping[t.index] mapped_group = tri_groups[mapped_index] diff --git a/release/scripts/modules/bpy_extras/node_shader_utils.py b/release/scripts/modules/bpy_extras/node_shader_utils.py index 1e83a247eff..9a3900bd58b 100644 --- a/release/scripts/modules/bpy_extras/node_shader_utils.py +++ b/release/scripts/modules/bpy_extras/node_shader_utils.py @@ -18,7 +18,6 @@ # <pep8 compliant> -import bpy from mathutils import Color, Vector __all__ = ( @@ -501,7 +500,7 @@ class ShaderImageTextureWrapper(): *NODES_LIST, ) - def __new__(cls, owner_shader: ShaderWrapper, node_dst, socket_dst, *args, **kwargs): + def __new__(cls, owner_shader: ShaderWrapper, node_dst, socket_dst, *_args, **_kwargs): instance = owner_shader._textures.get((node_dst, socket_dst), None) if instance is not None: return instance @@ -520,7 +519,7 @@ class ShaderImageTextureWrapper(): self._node_image = ... self._node_mapping = ... - tree = node_dst.id_data + # tree = node_dst.id_data # nodes = tree.nodes # links = tree.links diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py index cd74aa39916..a5d80fd7810 100644 --- a/release/scripts/modules/bpy_extras/object_utils.py +++ b/release/scripts/modules/bpy_extras/object_utils.py @@ -168,7 +168,7 @@ def object_data_add(context, obdata, operator=None, name=None): class AddObjectHelper: - def view_align_update_callback(self, context): + def view_align_update_callback(self, _context): if not self.view_align: self.rotation.zero() diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 86fb09ffb4b..3970517a211 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -905,7 +905,7 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta): props = row.operator(add_operator, text="", icon='ADD') props.name = wm.preset_name - def draw_preset(self, context): + def draw_preset(self, _context): """ Define these on the subclass: - preset_operator (string) @@ -945,7 +945,7 @@ class Node(StructRNA, metaclass=RNAMetaPropGroup): __slots__ = () @classmethod - def poll(cls, ntree): + def poll(cls, _ntree): return True diff --git a/release/scripts/modules/console_shell.py b/release/scripts/modules/console_shell.py index 474e2c6ff81..66fa3dcf6fb 100644 --- a/release/scripts/modules/console_shell.py +++ b/release/scripts/modules/console_shell.py @@ -44,7 +44,7 @@ def shell_run(text): PROMPT = "$ " -def execute(context, is_interactive): +def execute(context, _is_interactive): sc = context.space_data try: @@ -64,7 +64,7 @@ def execute(context, is_interactive): return {'FINISHED'} -def autocomplete(context): +def autocomplete(_context): # sc = context.space_data # TODO return {'CANCELLED'} diff --git a/release/scripts/modules/keyingsets_utils.py b/release/scripts/modules/keyingsets_utils.py index 35bae1e69b7..b865273831e 100644 --- a/release/scripts/modules/keyingsets_utils.py +++ b/release/scripts/modules/keyingsets_utils.py @@ -56,7 +56,7 @@ def path_add_property(path, prop): # selected objects (active object must be in object mode) -def RKS_POLL_selected_objects(ksi, context): +def RKS_POLL_selected_objects(_ksi, context): ob = context.active_object if ob: return ob.mode == 'OBJECT' @@ -65,7 +65,7 @@ def RKS_POLL_selected_objects(ksi, context): # selected bones -def RKS_POLL_selected_bones(ksi, context): +def RKS_POLL_selected_bones(_ksi, context): # we must be in Pose Mode, and there must be some bones selected ob = context.active_object if ob and ob.mode == 'POSE': @@ -112,7 +112,7 @@ def RKS_ITER_selected_bones(ksi, context, ks): # 'Available' F-Curves -def RKS_GEN_available(ksi, context, ks, data): +def RKS_GEN_available(_ksi, _context, ks, data): # try to get the animation data associated with the closest # ID-block to the data (neither of which may exist/be easy to find) id_block = data.id_data @@ -170,7 +170,7 @@ def get_transform_generators_base_info(data): # Location -def RKS_GEN_location(ksi, context, ks, data): +def RKS_GEN_location(_ksi, _context, ks, data): # get id-block and path info id_block, base_path, grouping = get_transform_generators_base_info(data) @@ -185,7 +185,7 @@ def RKS_GEN_location(ksi, context, ks, data): # Rotation -def RKS_GEN_rotation(ksi, context, ks, data): +def RKS_GEN_rotation(_ksi, _context, ks, data): # get id-block and path info id_block, base_path, grouping = get_transform_generators_base_info(data) @@ -206,7 +206,7 @@ def RKS_GEN_rotation(ksi, context, ks, data): # Scaling -def RKS_GEN_scaling(ksi, context, ks, data): +def RKS_GEN_scaling(_ksi, _context, ks, data): # get id-block and path info id_block, base_path, grouping = get_transform_generators_base_info(data) @@ -244,7 +244,7 @@ bbone_property_ids = ( # Add Keying Set entries for bendy bones -def RKS_GEN_bendy_bones(ksi, context, ks, data): +def RKS_GEN_bendy_bones(_ksi, _context, ks, data): # get id-block and path info # NOTE: This assumes that we're dealing with a bone here... id_block, base_path, grouping = get_transform_generators_base_info(data) diff --git a/release/scripts/modules/nodeitems_utils.py b/release/scripts/modules/nodeitems_utils.py index 76342b9e645..595b6c8ee5f 100644 --- a/release/scripts/modules/nodeitems_utils.py +++ b/release/scripts/modules/nodeitems_utils.py @@ -22,7 +22,7 @@ import bpy class NodeCategory: @classmethod - def poll(cls, context): + def poll(cls, _context): return True def __init__(self, identifier, name, description="", items=None): @@ -80,7 +80,7 @@ class NodeItem: # NB: is a staticmethod because called with an explicit self argument # NodeItemCustom sets this as a variable attribute in __init__ @staticmethod - def draw(self, layout, context): + def draw(self, layout, _context): props = layout.operator("node.add_node", text=self.label, text_ctxt=self.translation_context) props.type = self.nodetype props.use_transform = True diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index d01e8911040..12b423d637b 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -283,7 +283,7 @@ class PropertyPanel: @classmethod def poll(cls, context): - rna_item, context_member = rna_idprop_context_value(context, cls._context_path, cls._property_type) + rna_item, _context_member = rna_idprop_context_value(context, cls._context_path, cls._property_type) return bool(rna_item) """ |