Merge pull request #148 from jepler/upgrade-coverage

This commit is contained in:
Jeff Epler 2025-07-24 14:31:14 -05:00 committed by GitHub
commit b405a2dcb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 16 deletions

View file

@ -1,15 +0,0 @@
# SPDX-FileCopyrightText: 2021-2024 Jeff Epler
#
# SPDX-License-Identifier: GPL-3.0-only
[report]
exclude_also =
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
if TYPE_CHECKING:
class .*\bProtocol\):
@(abc\.)?abstractmethod

View file

@ -51,3 +51,5 @@ wwvbtk = "wwvb.wwvbtk:main"
[[tool.mypy.overrides]] [[tool.mypy.overrides]]
module = ["adafruit_datetime"] module = ["adafruit_datetime"]
follow_untyped_imports = true follow_untyped_imports = true
[tool.coverage.report]
exclude_also=["if TYPE_CHECKING:"]

View file

@ -5,7 +5,7 @@ adafruit-circuitpython-datetime
beautifulsoup4 beautifulsoup4
build build
click click
coverage coverage >= 7.1.0
mypy; implementation_name=="cpython" mypy; implementation_name=="cpython"
click>=8.1.5; implementation_name=="cpython" click>=8.1.5; implementation_name=="cpython"
leapseconddata leapseconddata

View file

@ -14,6 +14,14 @@ import unittest
from collections.abc import Sequence from collections.abc import Sequence
from typing import Any from typing import Any
# These imports must remain, even though the module contents are not used directly!
import wwvb.dut1table
import wwvb.gen
# The asserts below are to help prevent their removal by a linter.
assert wwvb.dut1table.__name__ == "wwvb.dut1table"
assert wwvb.gen.__name__ == "wwvb.gen"
coverage_add = ("-m", "coverage", "run", "--branch", "-p") if "COVERAGE_RUN" in os.environ else () coverage_add = ("-m", "coverage", "run", "--branch", "-p") if "COVERAGE_RUN" in os.environ else ()