Cleanup: double quotes for strings, replace f-string with str.format
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user