Cleanup: unused vars, imports
This commit is contained in:
parent
a0cde8ed08
commit
48b0695806
@ -51,8 +51,6 @@ _modules = {}
|
||||
|
||||
|
||||
def _enable(template_id, *, handle_error=None, ignore_not_found=False):
|
||||
import os
|
||||
import sys
|
||||
from bpy_restrict_state import RestrictBlend
|
||||
|
||||
if handle_error is None:
|
||||
@ -107,7 +105,6 @@ def _disable(template_id, *, handle_error=None):
|
||||
taking an exception argument.
|
||||
:type handle_error: function
|
||||
"""
|
||||
import sys
|
||||
|
||||
if handle_error is None:
|
||||
def handle_error(ex):
|
||||
@ -178,7 +175,7 @@ def activate(template_id=None):
|
||||
addon_utils.disable_all()
|
||||
|
||||
# ignore_not_found so modules that don't contain scripts don't raise errors
|
||||
mod = _enable(template_id, ignore_not_found=True) if template_id else None
|
||||
_mod = _enable(template_id, ignore_not_found=True) if template_id else None
|
||||
|
||||
_app_template["id"] = template_id
|
||||
|
||||
|
@ -754,14 +754,14 @@ def main():
|
||||
import rna_info
|
||||
struct = rna_info.BuildRNAInfo()[0]
|
||||
data = []
|
||||
for struct_id, v in sorted(struct.items()):
|
||||
for _struct_id, v in sorted(struct.items()):
|
||||
struct_id_str = v.identifier # "".join(sid for sid in struct_id if struct_id)
|
||||
|
||||
for base in v.get_bases():
|
||||
struct_id_str = base.identifier + "|" + struct_id_str
|
||||
|
||||
props = [(prop.identifier, prop) for prop in v.properties]
|
||||
for prop_id, prop in sorted(props):
|
||||
for _prop_id, prop in sorted(props):
|
||||
# if prop.type == "boolean":
|
||||
# continue
|
||||
prop_type = prop.type
|
||||
|
@ -396,7 +396,7 @@ def xml_file_write(context, filepath, rna_map, skip_typemap=None):
|
||||
|
||||
fw("<bpy>\n")
|
||||
|
||||
for rna_path, xml_tag in rna_map:
|
||||
for rna_path, _xml_tag in rna_map:
|
||||
# xml_tag is ignored, we get this from the rna
|
||||
value = _get_context_val(context, rna_path)
|
||||
rna2xml(fw,
|
||||
|
@ -23,7 +23,6 @@ from bpy.types import Operator
|
||||
from bpy.props import (
|
||||
BoolProperty,
|
||||
EnumProperty,
|
||||
FloatProperty,
|
||||
IntProperty,
|
||||
StringProperty,
|
||||
)
|
||||
|
@ -192,14 +192,16 @@ class VIEW3D_OT_select_or_deselect_all(Operator):
|
||||
return True
|
||||
|
||||
def invoke(self, context, event):
|
||||
retval = bpy.ops.view3d.select('INVOKE_DEFAULT',
|
||||
True, # undo push
|
||||
extend=self.extend,
|
||||
deselect=self.deselect,
|
||||
toggle=self.toggle,
|
||||
center=self.center,
|
||||
enumerate=self.enumerate,
|
||||
object=self.object)
|
||||
retval = bpy.ops.view3d.select(
|
||||
'INVOKE_DEFAULT',
|
||||
True, # undo push
|
||||
extend=self.extend,
|
||||
deselect=self.deselect,
|
||||
toggle=self.toggle,
|
||||
center=self.center,
|
||||
enumerate=self.enumerate,
|
||||
object=self.object,
|
||||
)
|
||||
|
||||
# Finished means something was selected.
|
||||
if 'FINISHED' in retval:
|
||||
|
@ -2212,7 +2212,7 @@ class WM_OT_addon_userpref_show(Operator):
|
||||
|
||||
module_name = self.module
|
||||
|
||||
modules = addon_utils.modules(refresh=False)
|
||||
_modules = addon_utils.modules(refresh=False)
|
||||
mod = addon_utils.addons_fake_modules.get(module_name)
|
||||
if mod is not None:
|
||||
info = addon_utils.module_bl_info(mod)
|
||||
@ -2521,7 +2521,7 @@ class WM_MT_splash(Menu):
|
||||
|
||||
def draw_setup(self, context):
|
||||
wm = context.window_manager
|
||||
userpref = context.user_preferences
|
||||
# userpref = context.user_preferences
|
||||
|
||||
layout = self.layout
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user