Cleanup: double quotes for strings, replace f-string with str.format

This commit is contained in:
Campbell Barton
2024-10-02 15:42:47 +10:00
parent dadb9ba5dc
commit 0b69e1d6f5
25 changed files with 299 additions and 298 deletions

View File

@@ -9,5 +9,5 @@ filename = "my_script.py"
filepath = os.path.join(os.path.dirname(bpy.data.filepath), filename)
global_namespace = {"__file__": filepath, "__name__": "__main__"}
with open(filepath, 'rb') as file:
with open(filepath, "rb") as file:
exec(compile(file.read(), filepath, 'exec'), global_namespace)

View File

@@ -3,7 +3,7 @@ import bpy
def write_some_data(context, filepath, use_some_setting):
print("running write_some_data...")
f = open(filepath, 'w', encoding='utf-8')
f = open(filepath, "w", encoding='utf-8')
f.write("Hello World {:s}".format(use_some_setting))
f.close()

View File

@@ -3,7 +3,7 @@ import bpy
def read_some_data(context, filepath, use_some_setting):
print("running read_some_data...")
f = open(filepath, 'r', encoding='utf-8')
f = open(filepath, "r", encoding="utf-8")
data = f.read()
f.close()

View File

@@ -11,7 +11,7 @@
# - provide a fixed list of previews to select from
# - provide a dynamic list of preview (eg. calculated from reading a directory)
#
# For the above use cases, see the template 'ui_previews_dynamic_enum.py"
# For the above use cases, see the template `ui_previews_dynamic_enum.py`.
import os