- some PEP8 cleanup
This commit is contained in:
10
FlatCAM.py
10
FlatCAM.py
@@ -1,4 +1,5 @@
|
||||
import sys, os
|
||||
import sys
|
||||
import os
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings, Qt
|
||||
@@ -10,6 +11,7 @@ if sys.platform == "win32":
|
||||
# cx_freeze 'module win32' workaround
|
||||
pass
|
||||
|
||||
|
||||
def debug_trace():
|
||||
"""
|
||||
Set a tracepoint in the Python debugger that works with Qt
|
||||
@@ -20,12 +22,11 @@ def debug_trace():
|
||||
pyqtRemoveInputHook()
|
||||
# set_trace()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# All X11 calling should be thread safe otherwise we have strange issues
|
||||
# QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
|
||||
# NOTE: Never talk to the GUI from threads! This is why I commented the above.
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
freeze_support()
|
||||
|
||||
debug_trace()
|
||||
@@ -59,4 +60,3 @@ if __name__ == '__main__':
|
||||
fc = App()
|
||||
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import gc
|
||||
from xml.dom.minidom import parseString as parse_xml_string
|
||||
|
||||
# #######################################
|
||||
# # Imports part of FlatCAM # ##
|
||||
# # Imports part of FlatCAM ##
|
||||
# #######################################
|
||||
from ObjectCollection import *
|
||||
from FlatCAMObj import *
|
||||
@@ -929,9 +929,8 @@ class App(QtCore.QObject):
|
||||
self.ui.general_defaults_form.general_app_group.language_cb.setCurrentText(ret_val)
|
||||
log.debug("App.__init__() --> Applied %s language." % str(ret_val).capitalize())
|
||||
|
||||
|
||||
# ##################################
|
||||
# # ## CREATE UNIQUE SERIAL NUMBER # ##
|
||||
# ### CREATE UNIQUE SERIAL NUMBER ##
|
||||
# ##################################
|
||||
|
||||
chars = 'abcdefghijklmnopqrstuvwxyz0123456789'
|
||||
@@ -2802,16 +2801,16 @@ class App(QtCore.QObject):
|
||||
self.date = ''.join(c for c in self.date if c not in ':-')
|
||||
self.date = self.date.replace(' ', '_')
|
||||
|
||||
filter = "Config File (*.FlatConfig);;All Files (*.*)"
|
||||
filter__ = "Config File (*.FlatConfig);;All Files (*.*)"
|
||||
try:
|
||||
filename, _f = QtWidgets.QFileDialog.getSaveFileName(
|
||||
caption=_("Export FlatCAM Preferences"),
|
||||
directory=self.data_path + '/preferences_' + self.date,
|
||||
filter=filter
|
||||
filter=filter__
|
||||
)
|
||||
except TypeError:
|
||||
filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Export FlatCAM Preferences"),
|
||||
filter=filter)
|
||||
filter=filter__)
|
||||
|
||||
filename = str(filename)
|
||||
defaults_from_file = {}
|
||||
|
||||
@@ -14,6 +14,7 @@ CAD program, and create G-Code for Isolation routing.
|
||||
- updated translations
|
||||
- fixed the the labels for shortcut keys for zoom in and zoom out both in the Menu links and in the Shortcut list
|
||||
- made sure the zoom functions use the global_zoom_ratio parameter from App.self.defaults dictionary.
|
||||
- some PEP8 cleanup
|
||||
|
||||
8.06.2019
|
||||
|
||||
|
||||
Reference in New Issue
Block a user