Autopep8 E265

This commit is contained in:
Calum Lind 2014-09-22 12:14:53 +01:00
parent 2f68092740
commit 142e96b246
49 changed files with 237 additions and 237 deletions

View File

@ -245,7 +245,7 @@ def open_url_in_browser(url):
import webbrowser
webbrowser.open(url)
## Formatting text functions
# Formatting text functions
# For performance reasons these fsize units are translated outside the function
byte_txt = "Bytes"

View File

@ -37,8 +37,8 @@ if windows_check():
'C:\\Program Files (x86)\\7-Zip\\7z.exe',
]
switch_7z = "x -y"
## Future suport:
## 7-zip cannot extract tar.* with single command.
# Future suport:
# 7-zip cannot extract tar.* with single command.
# ".tar.gz", ".tgz",
# ".tar.bz2", ".tbz",
# ".tar.lzma", ".tlz",
@ -53,9 +53,9 @@ if windows_check():
break
else:
required_cmds = ["unrar", "unzip", "tar", "unxz", "unlzma", "7zr", "bunzip2"]
## Possible future suport:
# Possible future suport:
# gunzip: gz (cmd will delete original archive)
## the following do not extract to dest dir
# the following do not extract to dest dir
# ".xz": ["xz", "-d --keep"],
# ".lzma": ["xz", "-d --format=lzma --keep"],
# ".bz2": ["bzip2", "-d --keep"],

View File

@ -314,7 +314,7 @@ class DelugeTransferProtocolTestCase(unittest.TestCase):
# message_to_send = eval(data)
# self.transfer.transfer_message(message_to_send)
#
# # Get the data as sent to the network by DelugeTransferProtocol
# Get the data as sent to the network by DelugeTransferProtocol
# compressed_data = self.transfer.get_messages_out_joined()
# packet_size = 16000 # Or something smaller...
#
@ -324,16 +324,16 @@ class DelugeTransferProtocolTestCase(unittest.TestCase):
# self.assertEquals(len(self.transfer.get_messages_in()), 0)
# else:
# self.assertEquals(len(self.transfer.get_messages_in()), 1)
# # Get the data as received by DelugeTransferProtocol
# Get the data as received by DelugeTransferProtocol
# transfered_message = self.transfer.get_messages_in().pop(0)
# # Test that the data structures are equal
# #self.assertEquals(transfered_message, message_to_send)
# #self.assertTrue(transfered_message == message_to_send)
# Test that the data structures are equal
# self.assertEquals(transfered_message, message_to_send)
# self.assertTrue(transfered_message == message_to_send)
#
# #f.close()
# #f = open("rencode.torrentlist", "w")
# #f.write(str(transfered_message))
# #f.close()
# f.close()
# f = open("rencode.torrentlist", "w")
# f.write(str(transfered_message))
# f.close()
def receive_parts_helper(self, data, packet_size, receive_func=None):
byte_count = len(data)

View File

@ -340,7 +340,7 @@ class FilesTab(Tab):
timestamp = gtk.get_current_event_time()
show_file(filepath, timestamp=timestamp)
## The following 3 methods create the folder/file view in the treeview
# The following 3 methods create the folder/file view in the treeview
def prepare_file_store(self, files):
split_files = {}
i = 0

View File

@ -111,22 +111,22 @@ class MenuBar(component.Component):
### Connect main window Signals ###
component.get("MainWindow").connect_signals({
## File Menu
# File Menu
"on_menuitem_addtorrent_activate": self.on_menuitem_addtorrent_activate,
"on_menuitem_createtorrent_activate": self.on_menuitem_createtorrent_activate,
"on_menuitem_quitdaemon_activate": self.on_menuitem_quitdaemon_activate,
"on_menuitem_quit_activate": self.on_menuitem_quit_activate,
## Edit Menu
# Edit Menu
"on_menuitem_preferences_activate": self.on_menuitem_preferences_activate,
"on_menuitem_connectionmanager_activate": self.on_menuitem_connectionmanager_activate,
## View Menu
# View Menu
"on_menuitem_toolbar_toggled": self.on_menuitem_toolbar_toggled,
"on_menuitem_sidebar_toggled": self.on_menuitem_sidebar_toggled,
"on_menuitem_statusbar_toggled": self.on_menuitem_statusbar_toggled,
## Help Menu
# Help Menu
"on_menuitem_homepage_activate": self.on_menuitem_homepage_activate,
"on_menuitem_faq_activate": self.on_menuitem_faq_activate,
"on_menuitem_community_activate": self.on_menuitem_community_activate,
@ -137,7 +137,7 @@ class MenuBar(component.Component):
# Connect menubar signals
self.builder.connect_signals({
## Torrent Menu
# Torrent Menu
"on_menuitem_pause_activate": self.on_menuitem_pause_activate,
"on_menuitem_resume_activate": self.on_menuitem_resume_activate,
"on_menuitem_updatetracker_activate": self.on_menuitem_updatetracker_activate,

View File

@ -1249,7 +1249,7 @@ class PathChooserComboBox(gtk.HBox, StoredValuesPopup, gobject.GObject):
self.auto_completer._end_completion(args)
######################################
## Callbacks and internal functions
# Callbacks and internal functions
######################################
def on_entry_text_changed(self, entry):
@ -1349,7 +1349,7 @@ class PathChooserComboBox(gtk.HBox, StoredValuesPopup, gobject.GObject):
self._stored_values_popping_down = False
######################################
## Config dialog
# Config dialog
######################################
def _on_button_toggle_dropdown_button_press_event(self, widget, event):

View File

@ -72,7 +72,7 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase, component.Compon
def _on_plugin_disabled_event(self, name):
self.disable_plugin(name)
## Hook functions
# Hook functions
def run_on_show_prefs(self):
"""This hook is run before the user is shown the preferences dialog.
It is designed so that plugins can update their preference page with
@ -89,7 +89,7 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase, component.Compon
for function in self.hooks["on_apply_prefs"]:
function()
## Plugin functions.. will likely move to own class..
# Plugin functions.. will likely move to own class..
def add_torrentview_text_column(self, *args, **kwargs):
return component.get("TorrentView").add_text_column(*args, **kwargs)