diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-27 09:46:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-28 08:50:51 +0300 |
commit | e17c6f79a57513eb1584fa79f698a8f3a85e0d9a (patch) | |
tree | c2d2483ddbdb816760dcf7f2b4a3d52a64abc6b2 /release/scripts/modules | |
parent | 3e590923485dd0206545654d58202fb073a4469d (diff) |
cleanup: py imports
Diffstat (limited to 'release/scripts/modules')
-rwxr-xr-x | release/scripts/modules/bl_i18n_utils/merge_po.py | 11 | ||||
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/utils.py | 7 | ||||
-rw-r--r-- | release/scripts/modules/bpy/path.py | 9 | ||||
-rw-r--r-- | release/scripts/modules/bpy/utils.py | 12 |
4 files changed, 22 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 d7dade22ffd..2fda42199bb 100755 --- a/release/scripts/modules/bl_i18n_utils/merge_po.py +++ b/release/scripts/modules/bl_i18n_utils/merge_po.py @@ -30,17 +30,20 @@ import sys -try: +if __package__ is None: import settings import utils -except: - from . import (settings, utils) +else: + from . import ( + settings, + utils, + ) # XXX This is a quick hack to make it work with new I18n... objects! To be reworked! def main(): import argparse - parser = argparse.ArgumentParser(description="" + parser = argparse.ArgumentParser(description= "Merge one or more .po files into the first dest one.\n" "If a msgkey (msgctxt, msgid) is present in more than one merged po, the one in the first file " "wins, unless it’s marked as fuzzy and one later is not.\n" diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py index 911e1764698..524fef909e8 100644 --- a/release/scripts/modules/bl_i18n_utils/utils.py +++ b/release/scripts/modules/bl_i18n_utils/utils.py @@ -31,9 +31,10 @@ import sys import tempfile #import time -from bl_i18n_utils import (settings, - utils_rtl, - ) +from bl_i18n_utils import ( + settings, + utils_rtl, + ) import bpy diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py index 874efc2e131..25a6c7242e0 100644 --- a/release/scripts/modules/bpy/path.py +++ b/release/scripts/modules/bpy/path.py @@ -43,10 +43,11 @@ __all__ = ( import bpy as _bpy import os as _os -from _bpy_path import (extensions_audio, - extensions_movie, - extensions_image, - ) +from _bpy_path import ( + extensions_audio, + extensions_movie, + extensions_image, + ) def _getattr_bytes(var, attr): diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py index bf882db74d9..5f235ae3958 100644 --- a/release/scripts/modules/bpy/utils.py +++ b/release/scripts/modules/bpy/utils.py @@ -51,12 +51,12 @@ __all__ = ( ) from _bpy import ( - escape_identifier, - register_class, - unregister_class, - blend_paths, - resource_path, - ) + escape_identifier, + register_class, + unregister_class, + blend_paths, + resource_path, + ) from _bpy import script_paths as _bpy_script_paths from _bpy import user_resource as _user_resource from _bpy import _utils_units as units |