From b1894ed7e0b150f732924a72f97623ca88fd8710 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 6 Feb 2017 10:45:36 +0100 Subject: [PATCH] Add a utils.unused() --- qutebrowser/utils/utils.py | 5 +++++ tests/unit/utils/test_utils.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index f3eab1eab..d0538f89a 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -871,3 +871,8 @@ def open_file(filename, cmdline=None): .format(filename, [cmd] + args)) proc = guiprocess.GUIProcess(what='open-file') proc.start_detached(cmd, args) + + +def unused(_arg): + """Function which does nothing to avoid pylint complaining.""" + pass diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index c790e7a31..457235eb8 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -1029,3 +1029,7 @@ class TestOpenFile: assert re.match( r"Opening /foo/bar with the system application", result) m.assert_called_with(QUrl('file:///foo/bar')) + + +def test_unused(): + unused(None)