diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-21 01:15:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-21 01:15:46 +0300 |
commit | 0a968510bf65cf3418b98fb4682d601433ae0152 (patch) | |
tree | ca9e905b4650be3d6a900d7f6cb00752cdf4905c /release/scripts/modules | |
parent | 87ad27ca89c3b1ce5243d6f67b42cd98ba99fd3f (diff) |
Cleanup: style, use raw strings
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/settings.py | 28 | ||||
-rw-r--r-- | release/scripts/modules/console/complete_namespace.py | 2 |
2 files changed, 16 insertions, 14 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index 7d5b33c50ac..150c2c36623 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -38,22 +38,22 @@ import bpy # The languages defined in Blender. LANGUAGES_CATEGORIES = ( # Min completeness level, UI english label. - ( 0.95, "Complete"), - ( 0.33, "In Progress"), - ( -1.0, "Starting"), + (0.95, "Complete"), + (0.33, "In Progress"), + (-1.0, "Starting"), ) LANGUAGES = ( # ID, UI english label, ISO code. - ( 0, "Default (Default)", "DEFAULT"), - ( 1, "English (English)", "en_US"), - ( 2, "Japanese (日本語)", "ja_JP"), - ( 3, "Dutch (Nederlandse taal)", "nl_NL"), - ( 4, "Italian (Italiano)", "it_IT"), - ( 5, "German (Deutsch)", "de_DE"), - ( 6, "Finnish (Suomi)", "fi_FI"), - ( 7, "Swedish (Svenska)", "sv_SE"), - ( 8, "French (Français)", "fr_FR"), - ( 9, "Spanish (Español)", "es"), + (0, "Default (Default)", "DEFAULT"), + (1, "English (English)", "en_US"), + (2, "Japanese (日本語)", "ja_JP"), + (3, "Dutch (Nederlandse taal)", "nl_NL"), + (4, "Italian (Italiano)", "it_IT"), + (5, "German (Deutsch)", "de_DE"), + (6, "Finnish (Suomi)", "fi_FI"), + (7, "Swedish (Svenska)", "sv_SE"), + (8, "French (Français)", "fr_FR"), + (9, "Spanish (Español)", "es"), (10, "Catalan (Català)", "ca_AD"), (11, "Czech (Český)", "cs_CZ"), (12, "Portuguese (Português)", "pt_PT"), @@ -514,6 +514,7 @@ def _do_set(ref, path): def _gen_get_set_path(ref, name): def _get(self): return _do_get(getattr(self, ref), getattr(self, name)) + def _set(self, value): setattr(self, name, _do_set(getattr(self, ref), value)) return _get, _set @@ -579,6 +580,7 @@ class I18nSettings: def _get_py_sys_paths(self): return self.INTERN_PY_SYS_PATHS + def _set_py_sys_paths(self, val): old_paths = set(self.INTERN_PY_SYS_PATHS.split(";")) - {""} new_paths = set(val.split(";")) - {""} diff --git a/release/scripts/modules/console/complete_namespace.py b/release/scripts/modules/console/complete_namespace.py index 3f223ba93dc..862f1a21260 100644 --- a/release/scripts/modules/console/complete_namespace.py +++ b/release/scripts/modules/console/complete_namespace.py @@ -26,7 +26,7 @@ import re import rlcompleter -RE_INCOMPLETE_INDEX = re.compile('(.*?)\[[^\]]+$') +RE_INCOMPLETE_INDEX = re.compile(r'(.*?)\[[^\]]+$') TEMP = '__tEmP__' # only \w characters are allowed! TEMP_N = len(TEMP) |