modified as requested

This commit is contained in:
siddhugolu 2017-10-24 12:20:07 +05:30
parent bc9d305354
commit 570f1a849f
4 changed files with 2 additions and 5 deletions

View File

@ -1490,7 +1490,6 @@ class CommandDispatcher:
@cmdutils.register(instance='command-dispatcher', scope='window') @cmdutils.register(instance='command-dispatcher', scope='window')
def view_source(self): def view_source(self):
"""Show the source of the current page in a new tab.""" """Show the source of the current page in a new tab."""
tab = self._current_widget() tab = self._current_widget()
if tab.data.viewing_source: if tab.data.viewing_source:
raise cmdexc.CommandError("Already viewing source!") raise cmdexc.CommandError("Already viewing source!")

View File

@ -499,11 +499,12 @@ def _format_block(filename, what, data):
def regenerate_manpage(filename): def regenerate_manpage(filename):
"""Update manpage OPTIONS using an argparse parser.""" """Update manpage OPTIONS using an argparse parser."""
# pylint: disable=protected-access
parser = qutebrowser.get_argparser() parser = qutebrowser.get_argparser()
groups = [] groups = []
# positionals, optionals and user-defined groups # positionals, optionals and user-defined groups
# pylint: disable=protected-access
for group in parser._action_groups: for group in parser._action_groups:
# pylint: enable=protected-access
groupdata = [] groupdata = []
groupdata.append('=== {}'.format(group.title)) groupdata.append('=== {}'.format(group.title))
if group.description is not None: if group.description is not None:
@ -513,7 +514,6 @@ def regenerate_manpage(filename):
if action_data is not None: if action_data is not None:
groupdata.append(action_data) groupdata.append(action_data)
groups.append('\n'.join(groupdata)) groups.append('\n'.join(groupdata))
# pylint: enable=protected-access
options = '\n'.join(groups) options = '\n'.join(groups)
# epilog # epilog
if parser.epilog is not None: if parser.epilog is not None:

View File

@ -92,7 +92,6 @@ class Tab(browsertab.AbstractTab):
pass pass
@pytest.mark.xfail(run=False, reason='Causes segfaults, see #1638') @pytest.mark.xfail(run=False, reason='Causes segfaults, see #1638')
def test_tab(qtbot, view, config_stub, tab_registry, mode_manager): def test_tab(qtbot, view, config_stub, tab_registry, mode_manager):
tab_w = Tab(win_id=0, mode_manager=mode_manager) tab_w = Tab(win_id=0, mode_manager=mode_manager)

View File

@ -94,7 +94,6 @@ def _pac_noexcept_test(call):
("known.domain", "'1.2.3.4'"), ("known.domain", "'1.2.3.4'"),
("bogus.domain.foobar", "null") ("bogus.domain.foobar", "null")
]) ])
def test_dnsResolve(monkeypatch, domain, expected): def test_dnsResolve(monkeypatch, domain, expected):
def mock_fromName(host): def mock_fromName(host):
info = QHostInfo() info = QHostInfo()