From b7d685b0c3f976cb49cdac9eae0124e017167171 Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Tue, 27 Nov 2018 14:35:37 -0500 Subject: [PATCH] Fix 'duplicate-string-formatting-argument' warning --- gridsync/desktop.py | 8 ++++---- gridsync/gui/invite.py | 4 ++-- gridsync/gui/share.py | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gridsync/desktop.py b/gridsync/desktop.py index 498c2650e..ab92179a9 100644 --- a/gridsync/desktop.py +++ b/gridsync/desktop.py @@ -105,12 +105,12 @@ def _autostart_enable_linux(executable): with open(autostart_file_path, 'w') as f: f.write('''\ [Desktop Entry] -Name={} -Comment={} +Name={0} +Comment={0} Type=Application -Exec=env PATH={} {} +Exec=env PATH={1} {2} Terminal=false -'''.format(APP_NAME, APP_NAME, os.environ['PATH'], executable)) +'''.format(APP_NAME, os.environ['PATH'], executable)) def _autostart_enable_mac(executable): diff --git a/gridsync/gui/invite.py b/gridsync/gui/invite.py index 33e71e72c..51f124ffb 100644 --- a/gridsync/gui/invite.py +++ b/gridsync/gui/invite.py @@ -237,10 +237,10 @@ def toggle_tor_status(self, state): self.lineedit.setStyleSheet( "border-width: 1px;" "border-style: solid;" - "border-color: {};" + "border-color: {0};" "border-radius: 2px;" "padding: 2px;" - "color: {};".format(TOR_DARK_PURPLE, TOR_DARK_PURPLE)) + "color: {0};".format(TOR_DARK_PURPLE)) else: self.lineedit.status_action.setIcon(self.lineedit.blank_icon) self.lineedit.status_action.setToolTip("") diff --git a/gridsync/gui/share.py b/gridsync/gui/share.py index 1fcb55edc..4d3eea7b4 100644 --- a/gridsync/gui/share.py +++ b/gridsync/gui/share.py @@ -488,13 +488,13 @@ def on_done(self, _): if self.joined_folders and len(self.joined_folders) == 1: target = self.joined_folders[0] self.message_label.setText( - 'Successfully joined folder "{}"!\n"{}" is now available for ' - 'download'.format(target, target)) + 'Successfully joined folder "{0}"!\n"{0}" is now available ' + 'for download'.format(target)) elif self.joined_folders: target = humanized_list(self.joined_folders, 'folders') self.message_label.setText( - 'Successfully joined {}!\n{} are now available for ' - 'download'.format(target, target)) + 'Successfully joined {0}!\n{0} are now available for ' + 'download'.format(target)) def on_grid_already_joined(self, grid_name): QMessageBox.information(