mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 22:23:57 -06:00
Style: Use "" for strings not ''
This commit is contained in:
parent
7cc493ad91
commit
0a6562a8f1
24 changed files with 242 additions and 240 deletions
|
@ -10,12 +10,12 @@ class GCodeWriter(MeshWriter):
|
|||
self._gcode = None
|
||||
|
||||
def write(self, file_name, storage_device, mesh_data):
|
||||
if 'gcode' in file_name:
|
||||
if "gcode" in file_name:
|
||||
scene = Application.getInstance().getController().getScene()
|
||||
gcode_list = getattr(scene, 'gcode_list')
|
||||
gcode_list = getattr(scene, "gcode_list")
|
||||
if gcode_list:
|
||||
f = storage_device.openFile(file_name, 'wt')
|
||||
Logger.log('d', "Writing GCode to file %s", file_name)
|
||||
f = storage_device.openFile(file_name, "wt")
|
||||
Logger.log("d", "Writing GCode to file %s", file_name)
|
||||
for gcode in gcode_list:
|
||||
f.write(gcode)
|
||||
storage_device.closeFile(f)
|
||||
|
|
|
@ -2,21 +2,21 @@ from . import GCodeWriter
|
|||
|
||||
from UM.i18n import i18nCatalog
|
||||
|
||||
catalog = i18nCatalog('cura')
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
def getMetaData():
|
||||
return {
|
||||
'type': 'mesh_writer',
|
||||
'plugin': {
|
||||
'name': 'GCode Writer',
|
||||
'author': 'Arjen Hiemstra',
|
||||
'version': '1.0',
|
||||
'description': catalog.i18nc('GCode Writer Plugin Description', 'Writes GCode to a file')
|
||||
"type": "mesh_writer",
|
||||
"plugin": {
|
||||
"name": "GCode Writer",
|
||||
"author": "Arjen Hiemstra",
|
||||
"version": "1.0",
|
||||
"description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file")
|
||||
},
|
||||
|
||||
'mesh_writer': {
|
||||
'extension': 'gcode',
|
||||
'description': catalog.i18nc('GCode Writer File Description', 'GCode File')
|
||||
"mesh_writer": {
|
||||
"extension": "gcode",
|
||||
"description": catalog.i18nc("GCode Writer File Description", "GCode File")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue