Skip to content

Commit

Permalink
Configure coverage.py for "if MYPY:"
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Dec 5, 2018
1 parent c752ba4 commit 403e63d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude_lines =
raise NotImplementedError
raise utils\.Unreachable
if __name__ == ["']__main__["']:
if MYPY:
[xml]
output=coverage.xml
2 changes: 1 addition & 1 deletion qutebrowser/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import typing

MYPY = False
if MYPY: # pragma: no cover
if MYPY:
# pylint: disable=unused-import,useless-suppression
from qutebrowser.config import config

Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from qutebrowser.keyinput import keyutils

MYPY = False
if MYPY: # pragma: no cover
if MYPY:
# pylint: disable=unused-import,useless-suppression
from typing import Tuple, MutableMapping
from qutebrowser.config import configcache, configfiles
Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/config/configcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from qutebrowser.keyinput import keyutils

MYPY = False
if MYPY: # pragma: no cover
if MYPY:
# pylint: disable=unused-import,useless-suppression
from qutebrowser.config.config import Config, KeyConfig

Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/config/configfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from qutebrowser.utils import standarddir, utils, qtutils, log, urlmatch

MYPY = False
if MYPY: # pragma: no cover
if MYPY:
# pylint: disable=unused-import, useless-suppression
from qutebrowser.misc import savemanager

Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/config/configutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from qutebrowser.config import configexc

MYPY = False
if MYPY: # pragma: no cover
if MYPY:
# pylint: disable=unused-import,useless-suppression
from qutebrowser.config import configdata

Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/misc/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import typing

MYPY = False
if MYPY: # pragma: no cover
if MYPY:
# pylint: disable=unused-import,useless-suppression
from qutebrowser.utils import usertypes
from qutebrowser.commands import command
Expand Down

0 comments on commit 403e63d

Please sign in to comment.