Fix pylint 2.0 useless-return cases
See https://github.com/PyCQA/pylint/issues/2300
This commit is contained in:
parent
b1d508a3af
commit
e50b6912a7
@ -1086,10 +1086,10 @@ class WebEngineTab(browsertab.AbstractTab):
|
|||||||
# percent encoded content is 2 megabytes minus 30 bytes.
|
# percent encoded content is 2 megabytes minus 30 bytes.
|
||||||
self._widget.setHtml(html, base_url)
|
self._widget.setHtml(html, base_url)
|
||||||
|
|
||||||
def networkaccessmanager(self):
|
def networkaccessmanager(self): # pylint: disable=useless-return
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def user_agent(self):
|
def user_agent(self): # pylint: disable=useless-return
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def clear_ssl_errors(self):
|
def clear_ssl_errors(self):
|
||||||
|
@ -246,7 +246,7 @@ class WrapperLayout(QLayout):
|
|||||||
def sizeHint(self):
|
def sizeHint(self):
|
||||||
return self._widget.sizeHint()
|
return self._widget.sizeHint()
|
||||||
|
|
||||||
def itemAt(self, _index):
|
def itemAt(self, _index): # pylint: disable=useless-return
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def takeAt(self, _index):
|
def takeAt(self, _index):
|
||||||
@ -287,7 +287,7 @@ class PseudoLayout(QLayout):
|
|||||||
def count(self):
|
def count(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def itemAt(self, _pos):
|
def itemAt(self, _pos): # pylint: disable=useless-return
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def widget(self):
|
def widget(self):
|
||||||
|
@ -365,7 +365,7 @@ def window_only(current_win_id):
|
|||||||
@cmdutils.register()
|
@cmdutils.register()
|
||||||
def nop():
|
def nop():
|
||||||
"""Do nothing."""
|
"""Do nothing."""
|
||||||
return
|
pass
|
||||||
|
|
||||||
|
|
||||||
@cmdutils.register()
|
@cmdutils.register()
|
||||||
|
@ -68,7 +68,7 @@ class FakeNode:
|
|||||||
def __init__(self, call):
|
def __init__(self, call):
|
||||||
self.rep_call = call
|
self.rep_call = call
|
||||||
|
|
||||||
def get_closest_marker(self, _name):
|
def get_closest_marker(self, _name): # pylint: disable=useless-return
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class FakeNetworkCache(QAbstractNetworkCache):
|
|||||||
def cacheSize(self):
|
def cacheSize(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def data(self, _url):
|
def data(self, _url): # pylint: disable=useless-return
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def insert(self, _dev):
|
def insert(self, _dev):
|
||||||
@ -53,7 +53,7 @@ class FakeNetworkCache(QAbstractNetworkCache):
|
|||||||
def metaData(self, _url):
|
def metaData(self, _url):
|
||||||
return QNetworkCacheMetaData()
|
return QNetworkCacheMetaData()
|
||||||
|
|
||||||
def prepare(self, _metadata):
|
def prepare(self, _metadata): # pylint: disable=useless-return
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def remove(self, _url):
|
def remove(self, _url):
|
||||||
|
@ -575,7 +575,7 @@ class FailingQIODevice(QIODevice):
|
|||||||
self.setErrorString("Writing failed")
|
self.setErrorString("Writing failed")
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
def read(self, _maxsize):
|
def read(self, _maxsize): # pylint: disable=useless-return
|
||||||
"""Simulate failed read."""
|
"""Simulate failed read."""
|
||||||
self.setErrorString("Reading failed")
|
self.setErrorString("Reading failed")
|
||||||
return None
|
return None
|
||||||
|
@ -410,11 +410,11 @@ class GotException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
def excepthook(_exc, _val, _tb):
|
def excepthook(_exc, _val, _tb):
|
||||||
return
|
pass
|
||||||
|
|
||||||
|
|
||||||
def excepthook_2(_exc, _val, _tb):
|
def excepthook_2(_exc, _val, _tb):
|
||||||
return
|
pass
|
||||||
|
|
||||||
|
|
||||||
class TestDisabledExcepthook:
|
class TestDisabledExcepthook:
|
||||||
|
Loading…
Reference in New Issue
Block a user