[Bf-blender-cvs] [e0e737b72ba] master: Cleanup: line length for Python scripts

Campbell Barton noreply at git.blender.org
Tue Apr 26 07:16:36 CEST 2022


Commit: e0e737b72babf128409e3ab87e50a390ff4501e1
Author: Campbell Barton
Date:   Tue Apr 26 15:13:26 2022 +1000
Branches: master
https://developer.blender.org/rBe0e737b72babf128409e3ab87e50a390ff4501e1

Cleanup: line length for Python scripts

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

M	release/scripts/modules/bl_i18n_utils/utils_cli.py
M	release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
M	tests/python/physics_particle_system.py

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

diff --git a/release/scripts/modules/bl_i18n_utils/utils_cli.py b/release/scripts/modules/bl_i18n_utils/utils_cli.py
index 37fb1aa4dea..dd75ac11ac4 100644
--- a/release/scripts/modules/bl_i18n_utils/utils_cli.py
+++ b/release/scripts/modules/bl_i18n_utils/utils_cli.py
@@ -59,10 +59,12 @@ def language_menu(args, settings):
     # 'DEFAULT' and en_US are always valid, fully-translated "languages"!
     stats = {"DEFAULT": 1.0, "en_US": 1.0}
 
-    po_to_uid = {os.path.basename(po_path_branch): uid
-                 for can_use, uid, _num_id, _name, _isocode, po_path_branch
-                 in utils_i18n.list_po_dir(settings.BRANCHES_DIR, settings)
-                 if can_use}
+    po_to_uid = {
+        os.path.basename(po_path_branch): uid
+        for can_use, uid, _num_id, _name, _isocode, po_path_branch
+        in utils_i18n.list_po_dir(settings.BRANCHES_DIR, settings)
+        if can_use
+    }
     for po_dir in os.listdir(settings.BRANCHES_DIR):
         po_dir = os.path.join(settings.BRANCHES_DIR, po_dir)
         if not os.path.isdir(po_dir):
@@ -82,36 +84,48 @@ def main():
     import argparse
 
     parser = argparse.ArgumentParser(description="Tool to perform common actions over PO/MO files.")
-    parser.add_argument('-s', '--settings', default=None,
-                        help="Override (some) default settings. Either a JSon file name, or a JSon string.")
+    parser.add_argument(
+        '-s', '--settings', default=None,
+        help="Override (some) default settings. Either a JSon file name, or a JSon string.",
+    )
     sub_parsers = parser.add_subparsers()
 
     sub_parser = sub_parsers.add_parser('update_po', help="Update a PO file from a given POT template file")
-    sub_parser.add_argument('--template', metavar='template.pot', required=True,
-                            help="The source pot file to use as template for the update.")
+    sub_parser.add_argument(
+        '--template', metavar='template.pot', required=True,
+        help="The source pot file to use as template for the update.",
+    )
     sub_parser.add_argument('--dst', metavar='dst.po', required=True, help="The destination po to update.")
     sub_parser.set_defaults(func=update_po)
 
-    sub_parser = sub_parsers.add_parser('cleanup_po',
-                                        help="Cleanup a PO file (check for and fix some common errors, remove commented messages).")
+    sub_parser = sub_parsers.add_parser(
+        'cleanup_po',
+        help="Cleanup a PO file (check for and fix some common errors, remove commented messages).",
+    )
     sub_parser.add_argument('--src', metavar='src.po', required=True, help="The source po file to clean up.")
     sub_parser.add_argument('--dst', metavar='dst.po', help="The destination po to write to.")
     sub_parser.set_defaults(func=cleanup_po)
 
-    sub_parser = sub_parsers.add_parser('strip_po',
-                                        help="Reduce all non-essential data from given PO file (reduce its size).")
+    sub_parser = sub_parsers.add_parser(
+        'strip_po',
+        help="Reduce all non-essential data from given PO file (reduce its size).",
+    )
     sub_parser.add_argument('--src', metavar='src.po', required=True, help="The source po file to strip.")
     sub_parser.add_argument('--dst', metavar='dst.po', help="The destination po to write to.")
     sub_parser.set_defaults(func=strip_po)
 
-    sub_parser = sub_parsers.add_parser('rtl_process_po',
-                                        help="Pre-process PO files for RTL languages.")
+    sub_parser = sub_parsers.add_parser(
+        'rtl_process_po',
+        help="Pre-process PO files for RTL languages.",
+    )
     sub_parser.add_argument('--src', metavar='src.po', required=True, help="The source po file to process.")
     sub_parser.add_argument('--dst', metavar='dst.po', help="The destination po to write to.")
     sub_parser.set_defaults(func=rtl_process_po)
 
-    sub_parser = sub_parsers.add_parser('language_menu',
-                                        help="Generate the text file used by Blender to create its language menu.")
+    sub_parser = sub_parsers.add_parser(
+        'language_menu',
+        help="Generate the text file used by Blender to create its language menu.",
+    )
     sub_parser.set_defaults(func=language_menu)
 
     args = parser.parse_args(sys.argv[1:])
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index 7faa418d74e..1459b0178a8 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -3239,9 +3239,11 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal
 
     items.extend([
         ("wm.radial_control", {"type": 'S', "value": 'PRESS'},
-         radial_control_properties(paint, 'size', 'use_unified_size', secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
+         radial_control_properties(
+             paint, 'size', 'use_unified_size', secondary_rotation=secondary_rotation, color=color, zoom=zoom)),
         ("wm.radial_control", {"type": 'U', "value": 'PRESS'},
-         radial_control_properties(paint, 'strength', 'use_unified_strength', secondary_rotation=secondary_rotation, color=color)),
+         radial_control_properties(
+             paint, 'strength', 'use_unified_strength', secondary_rotation=secondary_rotation, color=color)),
     ])
 
     if rotation:
@@ -3253,7 +3255,8 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal
     if secondary_rotation:
         items.extend([
             ("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True, "alt": True},
-             radial_control_properties(paint, 'mask_texture_slot.angle', None, secondary_rotation=secondary_rotation, color=color)),
+             radial_control_properties(
+                 paint, 'mask_texture_slot.angle', None, secondary_rotation=secondary_rotation, color=color)),
         ])
 
     return items
diff --git a/tests/python/physics_particle_system.py b/tests/python/physics_particle_system.py
index f558df0aeb7..37e3df781b0 100644
--- a/tests/python/physics_particle_system.py
+++ b/tests/python/physics_particle_system.py
@@ -12,10 +12,15 @@ from modules.mesh_test import RunTest, ParticleSystemSpec, SpecMeshTest
 
 def main():
     test = [
-        SpecMeshTest("ParticleSystemTest", "testParticleSystem", "expParticleSystem",
-                     [ParticleSystemSpec('Particles', 'PARTICLE_SYSTEM', {'render_type': "OBJECT",
-                                                                          'instance_object': bpy.data.objects['Cube']}, 20)], threshold=1e-3),
-
+        SpecMeshTest(
+            "ParticleSystemTest", "testParticleSystem", "expParticleSystem", [
+                ParticleSystemSpec(
+                    'Particles',
+                    'PARTICLE_SYSTEM',
+                    {'render_type': "OBJECT", 'instance_object': bpy.data.objects['Cube']}, 20)
+            ],
+            threshold=1e-3,
+        ),
     ]
     particle_test = RunTest(test)



More information about the Bf-blender-cvs mailing list