def finish(snippet):
	global createConfig
	global context
	fileContent = ""
	if createConfig["type"] == "script":
		fileContent = "define(function(){});"
		if 0 > len(context.settings["auto_add"]):
			for module in context.settings["auto_add"]:
				addEdit = editor.ModuleEdit(fileContent, context)
				addEdit.addModule(context.getModuleByImportString(module), module)
				fileContent = addEdit.render()+ "\n"+snippet+"\n});"
	file = open(createConfig["moduleFile"], 'w+')
	file.write(fileContent)
	file.close()

	# callback to let module be imported
	if createConfig["type"] == "script":
		temp = (createConfig["moduleFile"]).split(context.getBaseDir() + createConfig["packageBase"] + "/")[1];
		importString = temp[0:temp.rfind(".")]
	elif createConfig["type"] == "text":
		temp = (createConfig["moduleFile"]).split(context.getBaseDir() + createConfig["packageBase"] + "/")[1];
		importString = "text!" + context.settings["texts_name"] + "/" + temp
	createConfig["callback"](importString, createConfig)
dataset/ETHPy150Open jkcom/SublimeRJS/core/factory.py/finish/swapped operands of `>`