1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-30 07:09:39 +03:00

Replaced modulo-formatting with fstrings

This commit is contained in:
A_D 2020-09-12 01:39:10 +02:00
parent d77cfd0e7a
commit 742709c431
No known key found for this signature in database
GPG Key ID: 4BE9EB7DF45076C4

View File

@ -181,7 +181,7 @@ class PreferencesDialog(tk.Toplevel):
# position over parent
if platform != 'darwin' or parent.winfo_rooty() > 0: # http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
self.geometry("+%d+%d" % (parent.winfo_rootx(), parent.winfo_rooty()))
self.geometry(f'+{parent.winfo_rootx()}+{parent.winfo_rooty()}')
# remove decoration
if platform == 'win32':
@ -569,7 +569,7 @@ class PreferencesDialog(tk.Toplevel):
nb.Button(
plugsframe,
text=_('Open'), # Button that opens a folder in Explorer/Finder
command=lambda: webbrowser.open('file:///%s' % plugdir.get())
command=lambda: webbrowser.open(f'file:///{plugdir.get()}')
).grid(row=10, column=1, padx=(0, PADX), sticky=tk.NSEW)
nb.Label(
@ -589,7 +589,7 @@ class PreferencesDialog(tk.Toplevel):
if plugin.name == plugin.folder:
label = nb.Label(plugsframe, text=plugin.name)
else:
label = nb.Label(plugsframe, text='%s (%s)' % (plugin.folder, plugin.name))
label = nb.Label(plugsframe, text=f'{plugin.folder} ({plugin.name})')
label.grid(columnspan=2, padx=PADX*2, sticky=tk.W)
############################################################
@ -653,7 +653,7 @@ class PreferencesDialog(tk.Toplevel):
if CalculatePopupWindowPosition(POINT(parent.winfo_rootx(), parent.winfo_rooty()),
SIZE(position.right - position.left, position.bottom - position.top),
0x10000, None, position):
self.geometry("+%d+%d" % (position.left, position.top))
self.geometry("+{position.left}+{position.top}")
def cmdrchanged(self, event=None):
if self.cmdr != monitor.cmdr or self.is_beta != monitor.is_beta: