picky edits - use "" for non enum strings.

This commit is contained in:
Campbell Barton
2011-12-22 03:56:21 +00:00
parent 89db50a712
commit e7fb276e29
4 changed files with 31 additions and 31 deletions

View File

@@ -766,12 +766,12 @@ class WM_OT_path_open(Operator):
return {'CANCELLED'}
if sys.platform[:3] == "win":
subprocess.Popen(['start', filepath], shell=True)
elif sys.platform == 'darwin':
subprocess.Popen(['open', filepath])
subprocess.Popen(["start", filepath], shell=True)
elif sys.platform == "darwin":
subprocess.Popen(["open", filepath])
else:
try:
subprocess.Popen(['xdg-open', filepath])
subprocess.Popen(["xdg-open", filepath])
except OSError:
# xdg-open *should* be supported by recent Gnome, KDE, Xfce
pass
@@ -847,8 +847,8 @@ class WM_OT_doc_edit(Operator):
print("sending data:", data_dict)
import xmlrpc.client
user = 'blenderuser'
pwd = 'blender>user'
user = "blenderuser"
pwd = "blender>user"
docblog = xmlrpc.client.ServerProxy(self._url)
docblog.metaWeblog.newPost(1, user, pwd, data_dict, 1)
@@ -986,9 +986,8 @@ class WM_OT_properties_edit(Operator):
prop_ui = rna_idprop_ui_prop_get(item, prop)
if prop_type in {float, int}:
prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.min)
prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.max)
prop_ui["soft_min"] = prop_ui["min"] = prop_type(self.min)
prop_ui["soft_max"] = prop_ui["max"] = prop_type(self.max)
prop_ui['description'] = self.description
@@ -1035,7 +1034,7 @@ class WM_OT_properties_add(Operator):
item = eval("context.%s" % data_path)
def unique_name(names):
prop = 'prop'
prop = "prop"
prop_new = prop
i = 1
while prop_new in names:
@@ -1163,10 +1162,10 @@ class WM_OT_copy_prev_settings(Operator):
# in 2.57 and earlier windows installers, system scripts were copied
# into the configuration directory, don't want to copy those
system_script = os.path.join(path_dst, 'scripts/modules/bpy_types.py')
system_script = os.path.join(path_dst, "scripts/modules/bpy_types.py")
if os.path.isfile(system_script):
shutil.rmtree(os.path.join(path_dst, 'scripts'))
shutil.rmtree(os.path.join(path_dst, 'plugins'))
shutil.rmtree(os.path.join(path_dst, "scripts"))
shutil.rmtree(os.path.join(path_dst, "plugins"))
# don't loose users work if they open the splash later.
if bpy.data.is_saved is bpy.data.is_dirty is False:
@@ -1185,13 +1184,13 @@ class WM_OT_blenderplayer_start(bpy.types.Operator):
blender_bin_path = bpy.app.binary_path
blender_bin_dir = os.path.dirname(blender_bin_path)
ext = os.path.splitext(blender_bin_path)[-1]
player_path = os.path.join(blender_bin_dir, 'blenderplayer' + ext)
player_path = os.path.join(blender_bin_dir, "blenderplayer" + ext)
def execute(self, context):
import sys
if sys.platform == 'darwin':
self.player_path = os.path.join(self.blender_bin_dir, '../../../blenderplayer.app/Contents/MacOS/blenderplayer')
if sys.platform == "darwin":
self.player_path = os.path.join(self.blender_bin_dir, "../../../blenderplayer.app/Contents/MacOS/blenderplayer")
filepath = bpy.app.tempdir + "game.blend"
bpy.ops.wm.save_as_mainfile(filepath=filepath, check_existing=False, copy=True)
@@ -1451,7 +1450,7 @@ class WM_OT_operator_cheat_sheet(Operator):
for op_submodule_name in dir(op_module):
op = getattr(op_module, op_submodule_name)
text = repr(op)
if text.split("\n")[-1].startswith('bpy.ops.'):
if text.split("\n")[-1].startswith("bpy.ops."):
op_strings.append(text)
tot += 1