Changeset e37c81
- Timestamp:
- 11/04/2016 06:03:21 PM (9 years ago)
- Branches:
- 2.0.x, develop, master
- Children:
- 1e4189
- Parents:
- af6b27
- git-author:
- Calum Lind <calumlind+deluge@gmail.com> (11/04/2016 06:03:08 PM)
- git-committer:
- Calum Lind <calumlind+deluge@gmail.com> (11/04/2016 06:03:21 PM)
- Location:
- deluge
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
deluge/configmanager.py
raf6b27 re37c81 100 100 101 101 102 def ConfigManager(config, defaults=None, file_version=1): # NOQA 102 def ConfigManager(config, defaults=None, file_version=1): # NOQA: N802 103 103 return _configmanager.get_config(config, defaults=defaults, file_version=file_version) 104 104 -
deluge/core/rpcserver.py
raf6b27 re37c81 91 91 92 92 class ServerContextFactory(object): 93 def getContext(self): # NOQA 93 def getContext(self): # NOQA: N802 94 94 """ 95 95 Create an SSL context. … … 134 134 reactor.callLater(0, self.dispatch, *call) 135 135 136 def sendData(self, data): # NOQA 136 def sendData(self, data): # NOQA: N802 137 137 """ 138 138 Sends the data to the client. … … 150 150 raise 151 151 152 def connectionMade(self): # NOQA 152 def connectionMade(self): # NOQA: N802 153 153 """ 154 154 This method is called when a new client connects. … … 160 160 self.factory.authorized_sessions[self.transport.sessionno] = AUTH_LEVEL_NONE 161 161 162 def connectionLost(self, reason=connectionDone): # NOQA 162 def connectionLost(self, reason=connectionDone): # NOQA: N802 163 163 """ 164 164 This method is called when the client is disconnected. -
deluge/httpdownloader.py
raf6b27 re37c81 53 53 client.HTTPDownloader.__init__(self, url, filename, headers=headers, agent=agent) 54 54 55 def gotStatus(self, version, status, message): # NOQA 55 def gotStatus(self, version, status, message): # NOQA: N802 56 56 self.code = int(status) 57 57 client.HTTPDownloader.gotStatus(self, version, status, message) 58 58 59 def gotHeaders(self, headers): # NOQA 59 def gotHeaders(self, headers): # NOQA: N802 60 60 if self.code == http.OK: 61 61 if 'content-length' in headers: … … 93 93 return client.HTTPDownloader.gotHeaders(self, headers) 94 94 95 def pagePart(self, data): # NOQA 95 def pagePart(self, data): # NOQA: N802 96 96 if self.code == http.OK: 97 97 self.current_length += len(data) … … 103 103 return client.HTTPDownloader.pagePart(self, data) 104 104 105 def pageEnd(self): # NOQA 105 def pageEnd(self): # NOQA: N802 106 106 if self.decoder: 107 107 data = self.decoder.flush() … … 203 203 A custom context factory to add a server name for TLS connections. 204 204 """ 205 def getContext(self): # NOQA 205 def getContext(self): # NOQA: N802 206 206 ctx = ssl.ClientContextFactory.getContext(self) 207 207 ClientTLSOptions(host, ctx) -
deluge/log.py
raf6b27 re37c81 82 82 yield LoggingLoggerClass.exception(self, msg, *args, **kwargs) 83 83 84 def findCaller(self): # NOQA 84 def findCaller(self): # NOQA: N802 85 85 f = logging.currentframe().f_back 86 86 rv = '(unknown file)', 0, '(unknown function)' -
deluge/plugins/Blocklist/deluge/plugins/blocklist/decompressers.py
raf6b27 re37c81 14 14 15 15 16 def Zipped(reader): # NOQA 16 def Zipped(reader): # NOQA: N802 17 17 """Blocklist reader for zipped blocklists""" 18 18 def open(self): … … 29 29 30 30 31 def GZipped(reader): # NOQA 31 def GZipped(reader): # NOQA: N802 32 32 """Blocklist reader for gzipped blocklists""" 33 33 def open(self): … … 37 37 38 38 39 def BZipped2(reader): # NOQA 39 def BZipped2(reader): # NOQA: N802 40 40 """Blocklist reader for bzipped2 blocklists""" 41 41 def open(self): -
deluge/plugins/WebUi/deluge/plugins/webui/core.py
raf6b27 re37c81 21 21 from deluge.core.rpcserver import export 22 22 from deluge.plugins.pluginbase import CorePluginBase 23 24 try: 25 from deluge.ui.web import server 26 except ImportError: 27 server = False 23 28 24 29 log = logging.getLogger(__name__) … … 50 55 @export 51 56 def got_deluge_web(self): 52 try: 53 from deluge.ui.web import server # noqa pylint: disable=unused-import 54 return True 55 except ImportError: 56 return False 57 """Status of deluge-web module installation. 58 59 Check if deluge.ui.web.server modulge is installed and has been successfully imported. 60 61 Returns: 62 bool: True is deluge-web is installed and available, otherwise False. 63 64 """ 65 66 return bool(server) 57 67 58 68 def start_server(self): 59 69 if not self.server: 60 try: 61 from deluge.ui.web import server 62 except ImportError: 70 if not self.got_deluge_web(): 63 71 return False 64 72 -
deluge/tests/basetest.py
raf6b27 re37c81 14 14 15 15 """ 16 def setUp(self): # NOQA 16 def setUp(self): # NOQA: N803 17 17 18 18 if len(component._ComponentRegistry.components) != 0: … … 28 28 return d.addErrback(on_setup_error) 29 29 30 def tearDown(self): # NOQA 30 def tearDown(self): # NOQA: N803 31 31 d = maybeDeferred(self.tear_down) 32 32 -
deluge/tests/common.py
raf6b27 re37c81 98 98 pass 99 99 100 def addReader(self, arg): # NOQA 100 def addReader(self, arg): # NOQA: N802 101 101 pass 102 102 … … 124 124 self.watchdogs = [] 125 125 126 def connectionMade(self): # NOQA 126 def connectionMade(self): # NOQA: N802 127 127 self.transport.write(self.script) 128 128 self.transport.closeStdin() 129 129 130 def outConnectionLost(self): # NOQA 130 def outConnectionLost(self): # NOQA: N802 131 131 if not self.logfile: 132 132 return … … 155 155 w.cancel() 156 156 157 def processEnded(self, status): # NOQA 157 def processEnded(self, status): # NOQA: N802 158 158 self.transport.loseConnection() 159 159 if self.quit_d is None: … … 184 184 return ret 185 185 186 def outReceived(self, data): # NOQA 186 def outReceived(self, data): # NOQA: N802 187 187 """Process output from stdout""" 188 188 self.log_output += data … … 192 192 print(data, end=' ') 193 193 194 def errReceived(self, data): # NOQA 194 def errReceived(self, data): # NOQA: N802 195 195 """Process output from stderr""" 196 196 self.log_output += data -
deluge/tests/test_config.py
raf6b27 re37c81 15 15 16 16 class ConfigTestCase(unittest.TestCase): 17 def setUp(self): # NOQA 17 def setUp(self): # NOQA: N803 18 18 self.config_dir = set_tmp_config_dir() 19 19 -
deluge/tests/test_error.py
raf6b27 re37c81 5 5 6 6 class ErrorTestCase(unittest.TestCase): 7 def setUp(self): # NOQA 7 def setUp(self): # NOQA: N803 8 8 pass 9 9 10 def tearDown(self): # NOQA 10 def tearDown(self): # NOQA: N803 11 11 pass 12 12 -
deluge/tests/test_httpdownloader.py
raf6b27 re37c81 93 93 self.putChild('partial', PartialDownloadResource()) 94 94 95 def getChild(self, path, request): # NOQA 95 def getChild(self, path, request): # NOQA: N803 96 96 if path == '': 97 97 return self -
deluge/tests/test_transfer.py
raf6b27 re37c81 107 107 class DelugeTransferProtocolTestCase(unittest.TestCase): 108 108 109 def setUp(self): # NOQA 109 def setUp(self): # NOQA: N803 110 110 """ 111 111 The expected messages corresponds to the test messages (msg1, msg2) after they've been processed -
deluge/tests/test_ui_common.py
raf6b27 re37c81 16 16 class UICommonTestCase(unittest.TestCase): 17 17 18 def setUp(self): # NOQA 18 def setUp(self): # NOQA: N803 19 19 pass 20 20 21 def tearDown(self): # NOQA 21 def tearDown(self): # NOQA: N803 22 22 pass 23 23 -
deluge/tests/test_ui_console_fields.py
raf6b27 re37c81 15 15 class UICommonTestCase(unittest.TestCase): 16 16 17 def setUp(self): # NOQA 17 def setUp(self): # NOQA: N803 18 18 self.parent = Parent() 19 19 20 def tearDown(self): # NOQA 20 def tearDown(self): # NOQA: N803 21 21 pass 22 22 -
deluge/tests/twisted/plugins/delugereporter.py
raf6b27 re37c81 11 11 implements(IPlugin, IReporter) 12 12 13 def __init__(self, name, module, description, longOpt, shortOpt, klass): # NOQA 13 def __init__(self, name, module, description, longOpt, shortOpt, klass): # NOQA: N803 14 14 self.name = name 15 15 self.module = module … … 33 33 TreeReporter.__init__(self, *args, **kwargs) 34 34 35 def addExpectedFailure(self, *args): # NOQA 35 def addExpectedFailure(self, *args): # NOQA: N802 36 36 # super(TreeReporter, self).addExpectedFailure(*args) 37 37 self.endLine('[TODO]', self.TODO) -
deluge/transfer.py
raf6b27 re37c81 57 57 self.transport.write(compressed) 58 58 59 def dataReceived(self, data): # NOQA 59 def dataReceived(self, data): # NOQA: N802 60 60 """ 61 61 This method is called whenever data is received. -
deluge/ui/client.py
raf6b27 re37c81 74 74 class DelugeRPCProtocol(DelugeTransferProtocol): 75 75 76 def connectionMade(self): # NOQA 76 def connectionMade(self): # NOQA: N802 77 77 self.__rpc_requests = {} 78 78 # Set the protocol in the daemon so it can send data … … 193 193 self.event_handlers = event_handlers 194 194 195 def startedConnecting(self, connector): # NOQA 195 def startedConnecting(self, connector): # NOQA: N802 196 196 log.debug('Connecting to daemon at "%s:%s"...', 197 197 connector.host, connector.port) 198 198 199 def clientConnectionFailed(self, connector, reason): # NOQA 199 def clientConnectionFailed(self, connector, reason): # NOQA: N802 200 200 log.debug('Connection to daemon at "%s:%s" failed: %s', 201 201 connector.host, connector.port, reason.value) 202 202 self.daemon.connect_deferred.errback(reason) 203 203 204 def clientConnectionLost(self, connector, reason): # NOQA 204 def clientConnectionLost(self, connector, reason): # NOQA: N802 205 205 log.debug('Connection lost to daemon at "%s:%s" reason: %s', 206 206 connector.host, connector.port, reason.value) -
deluge/ui/console/cmdline/commands/__init__.py
raf6b27 re37c81 1 from deluge.ui.console.cmdline.command import BaseCommand # NOQA 1 from deluge.ui.console.cmdline.command import BaseCommand 2 3 __all__ = ['BaseCommand'] -
deluge/ui/console/modes/basemode.py
raf6b27 re37c81 87 87 return 0 88 88 89 def doRead(self): # NOQA 89 def doRead(self): # NOQA: N802 90 90 """called when input is ready""" 91 91 pass 92 92 93 def logPrefix(self): # NOQA 93 def logPrefix(self): # NOQA: N802 94 94 return 'CursesClient' 95 95 … … 144 144 self.rows, self.cols = rows, cols 145 145 146 def connectionLost(self, reason): # NOQA 146 def connectionLost(self, reason): # NOQA: N802 147 147 self.close() 148 148 … … 195 195 self.stdscr.refresh() 196 196 197 def doRead(self): # NOQA 197 def doRead(self): # NOQA: N802 198 198 """ 199 199 Called when there is data to be read, ie, input from the keyboard. -
deluge/ui/console/modes/preferences/__init__.py
raf6b27 re37c81 1 from deluge.ui.console.modes.preferences.preferences import Preferences # NOQA 1 from deluge.ui.console.modes.preferences.preferences import Preferences 2 3 __all__ = ['Preferences'] -
deluge/ui/console/widgets/__init__.py
raf6b27 re37c81 1 from deluge.ui.console.widgets.inputpane import BaseInputPane # NOQA 2 from deluge.ui.console.widgets.statusbars import StatusBars # NOQA 3 from deluge.ui.console.widgets.window import BaseWindow # NOQA 1 from deluge.ui.console.widgets.inputpane import BaseInputPane 2 from deluge.ui.console.widgets.statusbars import StatusBars 3 from deluge.ui.console.widgets.window import BaseWindow 4 5 __all__ = ['BaseInputPane', 'StatusBars', 'BaseWindow'] -
deluge/ui/gtkui/ipcinterface.py
raf6b27 re37c81 39 39 pass 40 40 41 def dataReceived(self, data): # NOQA 41 def dataReceived(self, data): # NOQA: N802 42 42 config = ConfigManager('gtkui.conf') 43 43 data = rencode.loads(data, decode_utf8=True) … … 52 52 pass 53 53 54 def connectionMade(self): # NOQA 54 def connectionMade(self): # NOQA: N802 55 55 self.transport.write(rencode.dumps(self.factory.args)) 56 56 self.transport.loseConnection() 57 57 58 def connectionLost(self, reason=connectionDone): # NOQA 58 def connectionLost(self, reason=connectionDone): # NOQA: N802 59 59 reactor.stop() 60 60 self.factory.stop = True … … 67 67 self.stop = False 68 68 69 def clientConnectionFailed(self, connector, reason): # NOQA 69 def clientConnectionFailed(self, connector, reason): # NOQA: N802 70 70 log.warning('Connection to running instance failed.') 71 71 reactor.stop() -
deluge/ui/gtkui/preferences.py
raf6b27 re37c81 25 25 from deluge.ui.gtkui.path_chooser import PathChooser 26 26 from deluge.ui.util import lang 27 28 try: 29 import appindicator 30 except ImportError: 31 appindicator = False 27 32 28 33 pygtk.require('2.0') … … 149 154 }) 150 155 151 if not deluge.common.osx_check() and not deluge.common.windows_check(): 152 try: 153 import appindicator # noqa pylint: disable=unused-import 154 except ImportError: 155 pass 156 else: 157 self.builder.get_object('alignment_tray_type').set_visible(True) 156 # Radio buttons to choose between systray and appindicator 157 self.builder.get_object('alignment_tray_type').set_visible(appindicator) 158 158 159 159 from deluge.ui.gtkui.gtkui import DEFAULT_PREFS -
deluge/ui/tracker_icons.py
raf6b27 re37c81 28 28 PIL_INSTALLED = False 29 29 else: 30 import deluge.ui.Win32IconImagePlugin # noqapylint: disable=unused-import, ungrouped-imports30 import deluge.ui.Win32IconImagePlugin # NOQA pylint: disable=unused-import, ungrouped-imports 31 31 PIL_INSTALLED = True 32 32 -
deluge/ui/web/server.py
raf6b27 re37c81 125 125 class Render(resource.Resource): 126 126 127 def getChild(self, path, request): # NOQA 127 def getChild(self, path, request): # NOQA: N802 128 128 request.render_file = path 129 129 return self … … 150 150 self.tracker_icons = TrackerIcons() 151 151 152 def getChild(self, path, request): # NOQA 152 def getChild(self, path, request): # NOQA: N802 153 153 request.tracker_name = path 154 154 return self … … 173 173 174 174 class Flag(resource.Resource): 175 def getChild(self, path, request): # NOQA 175 def getChild(self, path, request): # NOQA: N802 176 176 request.country = path 177 177 return self … … 212 212 self.__paths[path].remove(directory) 213 213 214 def getChild(self, path, request): # NOQA 214 def getChild(self, path, request): # NOQA: N802 215 215 if hasattr(request, 'lookup_path'): 216 216 request.lookup_path = os.path.join(request.lookup_path, path) … … 366 366 return scripts 367 367 368 def getChild(self, path, request): # NOQA 368 def getChild(self, path, request): # NOQA: N802 369 369 if hasattr(request, 'lookup_path'): 370 370 request.lookup_path += '/' + path … … 478 478 self.__debug_scripts.remove(script) 479 479 480 def getChild(self, path, request): # NOQA 480 def getChild(self, path, request): # NOQA: N802 481 481 if path == '': 482 482 return self … … 484 484 return resource.Resource.getChild(self, path, request) 485 485 486 def getChildWithDefault(self, path, request): # NOQA 486 def getChildWithDefault(self, path, request): # NOQA: N802 487 487 # Calculate the request base 488 488 header = request.getHeader('x-deluge-base')
Note:
See TracChangeset
for help on using the changeset viewer.