Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-05-28 09:05:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-05-28 09:58:50 +0300
commit3bee77bb7c234832b9ca00222e1e90a24f6437b0 (patch)
treee2795ffc68e4d18487b352e93e1405fe56ed83d1
parent6b03621c018acc3b343caa1d8d2aad746fcffc08 (diff)
Cleanup: use static set syntax
-rw-r--r--doc/blender_file_format/BlendFileReader.py4
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py2
-rw-r--r--source/blender/python/rna_dump.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/doc/blender_file_format/BlendFileReader.py b/doc/blender_file_format/BlendFileReader.py
index d4aed722578..a2f214bc4fc 100644
--- a/doc/blender_file_format/BlendFileReader.py
+++ b/doc/blender_file_format/BlendFileReader.py
@@ -85,7 +85,7 @@ def openBlendFile(filename):
'''
handle = open(filename, 'rb')
magic = ReadString(handle, 7)
- if magic in ("BLENDER", "BULLETf"):
+ if magic in {"BLENDER", "BULLETf"}:
log.debug("normal blendfile detected")
handle.seek(0, os.SEEK_SET)
return handle
@@ -137,7 +137,7 @@ class BlendFile:
fileblock = BlendFileBlock(handle, self)
found_dna_block = False
while not found_dna_block:
- if fileblock.Header.Code in ("DNA1", "SDNA"):
+ if fileblock.Header.Code in {"DNA1", "SDNA"}:
self.Catalog = DNACatalog(self.Header, handle)
found_dna_block = True
else:
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 8c683c3f205..ce1c401b14b 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -164,7 +164,7 @@ class _defs_annotate:
gpl = context.active_annotation_layer
if gpl is not None:
layout.label(text="Annotation:")
- if context.space_data.type in ('VIEW_3D', 'SEQUENCE_EDITOR'):
+ if context.space_data.type in {'VIEW_3D', 'SEQUENCE_EDITOR'}:
if region_type == 'TOOL_HEADER':
sub = layout.split(align=True, factor=0.5)
sub.ui_units_x = 6.5
diff --git a/source/blender/python/rna_dump.py b/source/blender/python/rna_dump.py
index 7d469d20110..bd45a36e8a4 100644
--- a/source/blender/python/rna_dump.py
+++ b/source/blender/python/rna_dump.py
@@ -62,7 +62,7 @@ def seek(r, txt, recurs):
# print(dir(r))
# basic types
- if type_r in (float, int, bool, type(None)):
+ if type_r in {float, int, bool, type(None)}:
if PRINT_DATA:
print(txt + ' -> ' + str(r))
return