diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-26 01:27:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-26 01:27:25 +0300 |
commit | 48b0695806877e0c204460fbed87dc64b685390d (patch) | |
tree | 6d8fab5fe0df43fde8699c51f8cddf7ce6de75a2 /release/scripts/modules | |
parent | a0cde8ed08190889eebdcf7f466512497e22f94d (diff) |
Cleanup: unused vars, imports
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bl_app_template_utils.py | 5 | ||||
-rw-r--r-- | release/scripts/modules/rna_info.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/rna_xml.py | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/release/scripts/modules/bl_app_template_utils.py b/release/scripts/modules/bl_app_template_utils.py index b81971b98b6..66ed7327b31 100644 --- a/release/scripts/modules/bl_app_template_utils.py +++ b/release/scripts/modules/bl_app_template_utils.py @@ -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 diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 535f2cda626..490aae1c640 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -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 diff --git a/release/scripts/modules/rna_xml.py b/release/scripts/modules/rna_xml.py index 7fc9bcb0261..f803a5b9f81 100644 --- a/release/scripts/modules/rna_xml.py +++ b/release/scripts/modules/rna_xml.py @@ -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, |