- PEP8 changes and PyCharm suggestions

This commit is contained in:
Marius Stanciu
2020-11-12 20:47:43 +02:00
committed by Marius Stanciu
parent 9abe11ff42
commit dea7ce3028
63 changed files with 527 additions and 659 deletions

View File

@@ -1,7 +1,7 @@
from PyQt5 import QtWidgets
from PyQt5.QtCore import QSettings
from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner
from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -33,13 +33,13 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)
self.param_label = QtWidgets.QLabel('<b>%s:</b>' % _('Parameters'))
self.param_label = FCLabel('<b>%s:</b>' % _('Parameters'))
self.param_label.setToolTip(
_("Parameters used for this tool.")
)
grid_lay.addWidget(self.param_label, 0, 0, 1, 2)
self.padt_label = QtWidgets.QLabel("<b>%s:</b>" % _("Processed Pads Type"))
self.padt_label = FCLabel("<b>%s:</b>" % _("Processed Pads Type"))
self.padt_label.setToolTip(
_("The type of pads shape to be processed.\n"
"If the PCB has many SMD pads with rectangular pads,\n"
@@ -103,7 +103,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
],
orientation='vertical',
stretch=False)
self.hole_size_label = QtWidgets.QLabel('<b>%s:</b>' % _("Method"))
self.hole_size_label = FCLabel('<b>%s:</b>' % _("Method"))
self.hole_size_label.setToolTip(
_("The punch hole source can be:\n"
"- Excellon Object-> the Excellon object drills center will serve as reference.\n"
@@ -114,7 +114,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.hole_size_label, 9, 0)
grid_lay.addWidget(self.hole_size_radio, 9, 1)
# grid_lay1.addWidget(QtWidgets.QLabel(''))
# grid_lay1.addWidget(FCLabel(''))
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
@@ -122,7 +122,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(separator_line, 10, 0, 1, 2)
# Annular Ring
self.fixed_label = QtWidgets.QLabel('<b>%s</b>' % _("Fixed Diameter"))
self.fixed_label = FCLabel('<b>%s</b>' % _("Fixed Diameter"))
grid_lay.addWidget(self.fixed_label, 11, 0, 1, 2)
# Diameter value
@@ -130,7 +130,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.dia_entry.set_precision(self.decimals)
self.dia_entry.set_range(0.0000, 10000.0000)
self.dia_label = QtWidgets.QLabel('%s:' % _("Value"))
self.dia_label = FCLabel('%s:' % _("Value"))
self.dia_label.setToolTip(
_("Fixed hole diameter.")
)
@@ -139,7 +139,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.dia_entry, 12, 1)
# Annular Ring value
self.ring_label = QtWidgets.QLabel('<b>%s</b>' % _("Fixed Annular Ring"))
self.ring_label = FCLabel('<b>%s</b>' % _("Fixed Annular Ring"))
self.ring_label.setToolTip(
_("The size of annular ring.\n"
"The copper sliver between the hole exterior\n"
@@ -148,7 +148,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.ring_label, 13, 0, 1, 2)
# Circular Annular Ring Value
self.circular_ring_label = QtWidgets.QLabel('%s:' % _("Circular"))
self.circular_ring_label = FCLabel('%s:' % _("Circular"))
self.circular_ring_label.setToolTip(
_("The size of annular ring for circular pads.")
)
@@ -161,7 +161,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.circular_ring_entry, 14, 1)
# Oblong Annular Ring Value
self.oblong_ring_label = QtWidgets.QLabel('%s:' % _("Oblong"))
self.oblong_ring_label = FCLabel('%s:' % _("Oblong"))
self.oblong_ring_label.setToolTip(
_("The size of annular ring for oblong pads.")
)
@@ -174,7 +174,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.oblong_ring_entry, 15, 1)
# Square Annular Ring Value
self.square_ring_label = QtWidgets.QLabel('%s:' % _("Square"))
self.square_ring_label = FCLabel('%s:' % _("Square"))
self.square_ring_label.setToolTip(
_("The size of annular ring for square pads.")
)
@@ -187,7 +187,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.square_ring_entry, 16, 1)
# Rectangular Annular Ring Value
self.rectangular_ring_label = QtWidgets.QLabel('%s:' % _("Rectangular"))
self.rectangular_ring_label = FCLabel('%s:' % _("Rectangular"))
self.rectangular_ring_label.setToolTip(
_("The size of annular ring for rectangular pads.")
)
@@ -200,7 +200,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.rectangular_ring_entry, 17, 1)
# Others Annular Ring Value
self.other_ring_label = QtWidgets.QLabel('%s:' % _("Others"))
self.other_ring_label = FCLabel('%s:' % _("Others"))
self.other_ring_label.setToolTip(
_("The size of annular ring for other pads.")
)
@@ -212,7 +212,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
grid_lay.addWidget(self.other_ring_label, 18, 0)
grid_lay.addWidget(self.other_ring_entry, 18, 1)
self.prop_label = QtWidgets.QLabel('<b>%s</b>' % _("Proportional Diameter"))
self.prop_label = FCLabel('<b>%s</b>' % _("Proportional Diameter"))
grid_lay.addWidget(self.prop_label, 19, 0, 1, 2)
# Factor value
@@ -221,7 +221,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.factor_entry.set_range(0.0000, 100.0000)
self.factor_entry.setSingleStep(0.1)
self.factor_label = QtWidgets.QLabel('%s:' % _("Factor"))
self.factor_label = FCLabel('%s:' % _("Factor"))
self.factor_label.setToolTip(
_("Proportional Diameter.\n"
"The hole diameter will be a fraction of the pad size.")