[Bf-blender-cvs] [0a968510bf6] master: Cleanup: style, use raw strings

Campbell Barton noreply at git.blender.org
Fri Sep 21 00:03:46 CEST 2018


Commit: 0a968510bf65cf3418b98fb4682d601433ae0152
Author: Campbell Barton
Date:   Fri Sep 21 08:15:46 2018 +1000
Branches: master
https://developer.blender.org/rB0a968510bf65cf3418b98fb4682d601433ae0152

Cleanup: style, use raw strings

===================================================================

M	release/scripts/modules/bl_i18n_utils/settings.py
M	release/scripts/modules/console/complete_namespace.py
M	source/blender/datatoc/datatoc_icon_split.py

===================================================================

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)
diff --git a/source/blender/datatoc/datatoc_icon_split.py b/source/blender/datatoc/datatoc_icon_split.py
index e7cc3a71446..399d7df4d8d 100755
--- a/source/blender/datatoc/datatoc_icon_split.py
+++ b/source/blender/datatoc/datatoc_icon_split.py
@@ -130,7 +130,7 @@ def dice_icon_name(
             import re
 
             # Search for eg: DEF_ICON(BRUSH_NUDGE) --> BRUSH_NUDGE
-            re_icon = re.compile('^\s*DEF_ICON\(\s*([A-Za-z0-9_]+)\s*\).*$')
+            re_icon = re.compile(r'^\s*DEF_ICON\(\s*([A-Za-z0-9_]+)\s*\).*$')
 
             ui_icons_h = os.path.join(SOURCE_DIR, "source", "blender", "editors", "include", "UI_icons.h")
             with open(ui_icons_h, 'r', encoding="utf-8") as f:



More information about the Bf-blender-cvs mailing list