diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-11-29 10:00:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-11-29 10:05:41 +0300 |
commit | ad7fb1c028433621a9f71ab01bbda2ca827ffe74 (patch) | |
tree | 864e0da811c59d04009f7f61ed2b170cd80dac6d /release/scripts/modules | |
parent | c17c6557b4ea4bfeb4528b74703795798aedaa66 (diff) |
Cleanup: Python imports
Split over lines to diff more easily.
Diffstat (limited to 'release/scripts/modules')
-rwxr-xr-x | release/scripts/modules/bl_i18n_utils/merge_po.py | 6 | ||||
-rw-r--r-- | release/scripts/modules/bl_previews_utils/bl_previews_render.py | 8 | ||||
-rw-r--r-- | release/scripts/modules/bpy/__init__.py | 13 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/io_utils.py | 8 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/object_utils.py | 8 | ||||
-rw-r--r-- | release/scripts/modules/bpyml_ui.py | 8 |
6 files changed, 34 insertions, 17 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/merge_po.py b/release/scripts/modules/bl_i18n_utils/merge_po.py index 2fda42199bb..ecb26123999 100755 --- a/release/scripts/modules/bl_i18n_utils/merge_po.py +++ b/release/scripts/modules/bl_i18n_utils/merge_po.py @@ -35,9 +35,9 @@ if __package__ is None: import utils else: from . import ( - settings, - utils, - ) + settings, + utils, + ) # XXX This is a quick hack to make it work with new I18n... objects! To be reworked! diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py index 71208ef3485..32266e972bb 100644 --- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py +++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py @@ -24,7 +24,11 @@ import os import bpy -from mathutils import Vector, Euler, Matrix +from mathutils import ( + Euler, + Matrix, + Vector, +) INTERN_PREVIEW_TYPES = {'MATERIAL', 'LAMP', 'WORLD', 'TEXTURE', 'IMAGE'} @@ -39,7 +43,7 @@ def rna_backup_gen(data, include_props=None, exclude_props=None, root=()): # only writable properties... for p in data.bl_rna.properties: pid = p.identifier - if pid in {'rna_type', }: + if pid == "rna_type": continue path = root + (pid,) if include_props is not None and path not in include_props: diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 545b891505f..6312c25065f 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -35,10 +35,19 @@ __all__ = ( # internal blender C module -from _bpy import types, props, app, data, context +from _bpy import ( + app, + context, + data, + props, + types, +) # python modules -from . import utils, path +from . import ( + path, + utils, +) # fake operator module from .ops import ops_fake_module as ops diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index a7ecd0b80c0..8a516f12b17 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -36,10 +36,10 @@ __all__ = ( import bpy from bpy.props import ( - StringProperty, - BoolProperty, - EnumProperty, - ) + BoolProperty, + EnumProperty, + StringProperty, +) def _check_axis_conversion(op): diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py index c48f03c133d..9d9b5df1f9a 100644 --- a/release/scripts/modules/bpy_extras/object_utils.py +++ b/release/scripts/modules/bpy_extras/object_utils.py @@ -32,10 +32,10 @@ __all__ = ( import bpy from bpy.props import ( - BoolProperty, - BoolVectorProperty, - FloatVectorProperty, - ) + BoolProperty, + BoolVectorProperty, + FloatVectorProperty, +) def add_object_align_init(context, operator): diff --git a/release/scripts/modules/bpyml_ui.py b/release/scripts/modules/bpyml_ui.py index dd5fc38d0eb..1ba89ad098b 100644 --- a/release/scripts/modules/bpyml_ui.py +++ b/release/scripts/modules/bpyml_ui.py @@ -21,7 +21,11 @@ import bpy as _bpy import bpyml -from bpyml import TAG, ARGS, CHILDREN +from bpyml import ( + TAG, + ARGS, + CHILDREN, +) _uilayout_rna = _bpy.types.UILayout.bl_rna @@ -29,7 +33,7 @@ _uilayout_tags = ( ["ui"] + _uilayout_rna.properties.keys() + _uilayout_rna.functions.keys() - ) +) # these need to be imported directly # >>> from bpyml_ui.locals import * |