Skip to content

Commit 07a3ef4

Browse files
committed
qtplasmac: rename variables to avoid conflict with python builtin names
1 parent 7899abe commit 07a3ef4

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,8 +1609,8 @@ def progress_changed(self, object, percent):
16091609
self.w.gcode_display.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
16101610

16111611
def user_system_changed(self, obj, data):
1612-
sys = self.systemList[int(data)]
1613-
self.w.wcs_button.setText(f'WCS\n{sys}')
1612+
userSys = self.systemList[int(data)]
1613+
self.w.wcs_button.setText(f'WCS\n{userSys}')
16141614
if ACTION.prefilter_path:
16151615
self.file_reload_clicked()
16161616

@@ -3425,29 +3425,29 @@ def dialog_show_yesno(self, icon, title, error, bY=_translate('HandlerClass', 'Y
34253425

34263426
# virtkb: 0=none, 1=alpha~close, 2=num~close, 3=alpha~num, 4=num~num, 5=alpha~alpha, 6=num~alpha
34273427
def dialog_input(self, virtkb, title, text, btn1, btn2, delay=None):
3428-
input = QInputDialog(self.w)
3429-
input.setWindowTitle(title)
3430-
input.setLabelText(f'{text}')
3428+
dialog = QInputDialog(self.w)
3429+
dialog.setWindowTitle(title)
3430+
dialog.setLabelText(f'{text}')
34313431
if btn1:
3432-
input.setOkButtonText(btn1)
3432+
dialog.setOkButtonText(btn1)
34333433
if btn2:
3434-
input.setCancelButtonText(btn2)
3434+
dialog.setCancelButtonText(btn2)
34353435
if delay is not None:
3436-
input.setTextValue(f'{delay:0.2f}')
3437-
for button in input.findChildren(QPushButton):
3436+
dialog.setTextValue(f'{delay:0.2f}')
3437+
for button in dialog.findChildren(QPushButton):
34383438
button.setIcon(QIcon())
34393439
if virtkb in (1, 3, 5):
34403440
self.vkb_show(False)
34413441
elif virtkb in (2, 4, 6):
34423442
self.vkb_show(True)
3443-
valid = input.exec_()
3443+
valid = dialog.exec_()
34443444
if virtkb < 3:
34453445
self.vkb_hide()
34463446
elif virtkb in (3, 4):
34473447
self.vkb_show(True)
34483448
elif virtkb in (5, 6):
34493449
self.vkb_show(False)
3450-
out = input.textValue()
3450+
out = dialog.textValue()
34513451
return valid, out
34523452

34533453
def dialog_run_from_line(self):
@@ -4441,10 +4441,10 @@ def user_button_down(self, bNum):
44414441
elif bCode.lower().startswith('latest-file'):
44424442
try:
44434443
if len(bCode.split()) == 2:
4444-
dir = bCode.split()[1]
4444+
lastDir = bCode.split()[1]
44454445
else:
4446-
dir = self.w.PREFS_.getpref('last_loaded_directory', '', str, 'BOOK_KEEPING')
4447-
files = glob.glob(f'{dir}/*.ngc')
4446+
lastDir = self.w.PREFS_.getpref('last_loaded_directory', '', str, 'BOOK_KEEPING')
4447+
files = glob.glob(f'{lastDir}/*.ngc')
44484448
latest = max(files, key=os.path.getctime)
44494449
self.overlayProgress.setValue(0)
44504450
self.remove_temp_materials()

0 commit comments

Comments
 (0)