From 75360370ffb052fc1dd6a64d0ba144ac256b9776 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Wed, 15 Feb 2023 16:47:12 +0200 Subject: [PATCH] Improve test coverage --- qrcode/image/styledpil.py | 3 +-- qrcode/image/styles/moduledrawers/__init__.py | 2 +- setup.cfg | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qrcode/image/styledpil.py b/qrcode/image/styledpil.py index 7c9d9995..b6b9c3b6 100644 --- a/qrcode/image/styledpil.py +++ b/qrcode/image/styledpil.py @@ -104,8 +104,7 @@ def draw_embeded_image(self): def save(self, stream, format=None, **kwargs): if format is None: format = kwargs.get("kind", self.kind) - if "kind" in kwargs: - del kwargs["kind"] + kwargs.pop("kind", None) self._img.save(stream, format=format, **kwargs) def __getattr__(self, name): diff --git a/qrcode/image/styles/moduledrawers/__init__.py b/qrcode/image/styles/moduledrawers/__init__.py index 99217d49..ff8d33ce 100644 --- a/qrcode/image/styles/moduledrawers/__init__.py +++ b/qrcode/image/styles/moduledrawers/__init__.py @@ -6,5 +6,5 @@ from .pil import RoundedModuleDrawer # noqa: F401 from .pil import SquareModuleDrawer # noqa: F401 from .pil import VerticalBarsDrawer # noqa: F401 -except ImportError: +except ImportError: # pragma: no cover pass diff --git a/setup.cfg b/setup.cfg index 3aff842a..1279c0f5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -80,9 +80,11 @@ parallel = True [coverage:report] exclude_lines = - pragma: no cover + @abc.abstractmethod @overload if (typing\.)?TYPE_CHECKING: + pragma: no cover + raise NotImplementedError skip_covered = True [zest.releaser]