Remove unneeded "# pragma: no branch" comments

Those are not needed anymore with coverage 4.1.
This commit is contained in:
Florian Bruhin 2016-05-24 15:40:50 +02:00
parent 11363b9533
commit c6cb8e5099
4 changed files with 6 additions and 6 deletions

View File

@ -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))

View File

@ -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")

View File

@ -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 '<dead_actute>' 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")

View File

@ -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