Skip to content

Commit

Permalink
tests: remove some coverage ignore pragmas
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Feb 22, 2024
1 parent 5a06642 commit 1c998d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions nox/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from packaging.specifiers import InvalidSpecifier, SpecifierSet
from packaging.version import InvalidVersion, Version

if sys.version_info >= (3, 8): # pragma: no cover
if sys.version_info >= (3, 8):
import importlib.metadata as metadata
else: # pragma: no cover
else:
import importlib_metadata as metadata


Expand Down
6 changes: 3 additions & 3 deletions nox/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
from nox.logger import logger
from nox.popen import popen

if sys.version_info < (3, 8): # pragma: no cover
if sys.version_info < (3, 8):
from typing_extensions import Literal
else: # pragma: no cover
else:
from typing import Literal

ExternalType = Literal["error", True, False]
Expand Down Expand Up @@ -62,7 +62,7 @@ def _clean_env(env: Mapping[str, str] | None = None) -> dict[str, str] | None:
clean_env: dict[str, str] = {}

# Ensure systemroot is passed down, otherwise Windows will explode.
if sys.platform == "win32": # pragma: no cover
if sys.platform == "win32":
clean_env["SYSTEMROOT"] = os.environ.get("SYSTEMROOT", "")

clean_env.update(env)
Expand Down
4 changes: 0 additions & 4 deletions nox/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,10 @@ def __init__(self, name: str, level: int = logging.NOTSET):
def success(self, msg: str, *args: Any, **kwargs: Any) -> None:
if self.isEnabledFor(SUCCESS):
self._log(SUCCESS, msg, args, **kwargs)
else: # pragma: no cover
pass

def output(self, msg: str, *args: Any, **kwargs: Any) -> None:
if self.isEnabledFor(OUTPUT):
self._log(OUTPUT, msg, args, **kwargs)
else: # pragma: no cover
pass


logging.setLoggerClass(LoggerWithSuccessAndOutput)
Expand Down

0 comments on commit 1c998d1

Please sign in to comment.