[Bf-blender-cvs] [e3724d29ffb] master: Cleanup: autopep8

Campbell Barton noreply at git.blender.org
Tue Apr 26 07:04:06 CEST 2022


Commit: e3724d29ffb753867ebd1c52f7b644fdcb2bba25
Author: Campbell Barton
Date:   Tue Apr 26 15:03:04 2022 +1000
Branches: master
https://developer.blender.org/rBe3724d29ffb753867ebd1c52f7b644fdcb2bba25

Cleanup: autopep8

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

M	doc/blender_file_format/BlendFileDnaExporter_25.py
M	doc/python_api/examples/gpu.8.py
M	release/scripts/modules/bl_i18n_utils/utils_spell_check.py
M	release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py
M	tests/python/eevee_render_tests.py
M	tests/python/geo_node_test.py

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

diff --git a/doc/blender_file_format/BlendFileDnaExporter_25.py b/doc/blender_file_format/BlendFileDnaExporter_25.py
index 91a313b789f..f84f7482baf 100755
--- a/doc/blender_file_format/BlendFileDnaExporter_25.py
+++ b/doc/blender_file_format/BlendFileDnaExporter_25.py
@@ -411,7 +411,7 @@ def main():
         # read blend header from blend file
         log.info("2: read file:")
 
-        if not dir in sys.path:
+        if dir not in sys.path:
             sys.path.append(dir)
         import BlendFileReader
 
diff --git a/doc/python_api/examples/gpu.8.py b/doc/python_api/examples/gpu.8.py
index 86a242b0258..385b71d0c1a 100644
--- a/doc/python_api/examples/gpu.8.py
+++ b/doc/python_api/examples/gpu.8.py
@@ -43,7 +43,7 @@ with offscreen.bind():
 offscreen.free()
 
 
-if not IMAGE_NAME in bpy.data.images:
+if IMAGE_NAME not in bpy.data.images:
     bpy.data.images.new(IMAGE_NAME, WIDTH, HEIGHT)
 image = bpy.data.images[IMAGE_NAME]
 image.scale(WIDTH, HEIGHT)
diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
index 31b9705e45c..f9208bbe3ee 100644
--- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
+++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
@@ -668,7 +668,7 @@ class SpellChecker:
 
         # Acronyms
         "aa", "msaa",
-        "acescg", # ACEScg color space.
+        "acescg",  # ACEScg color space.
         "ao",
         "aov", "aovs",
         "api",
diff --git a/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py b/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py
index 6d41e290512..2cfba52d688 100644
--- a/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py
+++ b/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py
@@ -391,7 +391,7 @@ def generate(context, space_type, *, use_fallback_keys=True, use_reset=True):
                 if key is not None:
                     kmi_args["type"] = key
                     kmi_tuple = dict_as_tuple(kmi_args)
-                    if not kmi_tuple in kmi_unique_args:
+                    if kmi_tuple not in kmi_unique_args:
                         kmi = keymap.keymap_items.new(idname="wm.tool_set_by_id", value='PRESS', **kmi_args)
                         kmi.properties.name = item.idname
                         kmi_unique_args.add(kmi_tuple)
diff --git a/tests/python/eevee_render_tests.py b/tests/python/eevee_render_tests.py
index bd14fadb3b3..8c6f08ae76e 100644
--- a/tests/python/eevee_render_tests.py
+++ b/tests/python/eevee_render_tests.py
@@ -63,7 +63,7 @@ def setup():
         collection = bpy.data.collections.new("Reflection")
         collection.objects.link(plane)
         # Add all lights to light the plane
-        if invert == False:
+        if not invert:
             for light in bpy.data.objects:
                 if light.type == 'LIGHT':
                     collection.objects.link(light)
diff --git a/tests/python/geo_node_test.py b/tests/python/geo_node_test.py
index 65ea500d2a1..9d7c634db76 100644
--- a/tests/python/geo_node_test.py
+++ b/tests/python/geo_node_test.py
@@ -13,5 +13,5 @@ geo_node_test = BlendFileTest("test_object", "expected_object", threshold=1e-4)
 result = geo_node_test.run_test()
 
 # Telling `ctest` about the failed test by raising Exception.
-if result == False:
+if not result:
     raise Exception("Failed {}".format(geo_node_test.test_name))



More information about the Bf-blender-cvs mailing list