From c6cb8e5099774e91dd404f530bcbc591e8c49b24 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 24 May 2016 15:40:50 +0200 Subject: [PATCH] Remove unneeded "# pragma: no branch" comments Those are not needed anymore with coverage 4.1. --- qutebrowser/misc/editor.py | 4 ++-- qutebrowser/utils/standarddir.py | 2 +- qutebrowser/utils/utils.py | 4 ++-- qutebrowser/utils/version.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qutebrowser/misc/editor.py b/qutebrowser/misc/editor.py index d938d68f9..bcc07129a 100644 --- a/qutebrowser/misc/editor.py +++ b/qutebrowser/misc/editor.py @@ -83,7 +83,7 @@ class ExternalEditor(QObject): encoding = config.get('general', 'editor-encoding') try: with open(self._filename, 'r', encoding=encoding) as f: - text = f.read() # pragma: no branch + text = f.read() except OSError as e: # NOTE: Do not replace this with "raise CommandError" as it's # executed async. @@ -114,7 +114,7 @@ class ExternalEditor(QObject): if text: encoding = config.get('general', 'editor-encoding') with open(self._filename, 'w', encoding=encoding) as f: - f.write(text) # pragma: no branch + f.write(text) except OSError as e: message.error(self._win_id, "Failed to create initial file: " "{}".format(e)) diff --git a/qutebrowser/utils/standarddir.py b/qutebrowser/utils/standarddir.py index 87effe6e0..872ef758b 100644 --- a/qutebrowser/utils/standarddir.py +++ b/qutebrowser/utils/standarddir.py @@ -226,7 +226,7 @@ def _init_cachedir_tag(): f.write("# This file is a cache directory tag created by " "qutebrowser.\n") f.write("# For information about cache directory tags, see:\n") - f.write("# http://www.brynosaurus.com/" # pragma: no branch + f.write("# http://www.brynosaurus.com/" "cachedir/\n") except OSError: log.init.exception("Failed to create CACHEDIR.TAG") diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index febceca76..bbd0ac20d 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -132,7 +132,7 @@ def actute_warning(): try: with open('/usr/share/X11/locale/en_US.UTF-8/Compose', 'r', encoding='utf-8') as f: - for line in f: # pragma: no branch + for line in f: if '' in line: if sys.stdout is not None: sys.stdout.flush() @@ -140,7 +140,7 @@ def actute_warning(): "that is not a bug in qutebrowser! See " "https://bugs.freedesktop.org/show_bug.cgi?id=69476 " "for details.") - break # pragma: no branch + break except OSError: log.init.exception("Failed to read Compose file") diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index f3338894b..6081177a9 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -114,7 +114,7 @@ def _release_info(): for fn in glob.glob("/etc/*-release"): try: with open(fn, 'r', encoding='utf-8') as f: - data.append((fn, f.read())) # pragma: no branch + data.append((fn, f.read())) except OSError: log.misc.exception("Error while reading {}.".format(fn)) return data