diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-03-07 11:00:59 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-03-07 11:00:59 -0500 |
commit | d76daad2f184a0c9ec4dc8e80e4ca20ea9e39d7c (patch) | |
tree | 16d3d0a68dfba4bd41098f8c71c83d5f37efb409 /tests | |
parent | 489579769acc2f0bf41b220773c13fde2b550770 (diff) | |
download | python-coveragepy-git-d76daad2f184a0c9ec4dc8e80e4ca20ea9e39d7c.tar.gz |
build: run mypy by default, and fix "unused" errors from updated mypy
Diffstat (limited to 'tests')
-rw-r--r-- | tests/coveragetest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 0055c691..cec565ef 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -293,7 +293,7 @@ class CoverageTest( def capture_warning( msg: str, slug: Optional[str] = None, - once: bool = False, # pylint: disable=unused-argument + once: bool = False, # pylint: disable=unused-argument ) -> None: """A fake implementation of Coverage._warn, to capture warnings.""" # NOTE: we don't implement `once`. @@ -302,7 +302,7 @@ class CoverageTest( saved_warnings.append(msg) original_warn = cov._warn - cov._warn = capture_warning # type: ignore[assignment] + cov._warn = capture_warning # type: ignore[method-assign] try: yield @@ -327,7 +327,7 @@ class CoverageTest( if saved_warnings: assert False, f"Unexpected warnings: {saved_warnings!r}" finally: - cov._warn = original_warn # type: ignore[assignment] + cov._warn = original_warn # type: ignore[method-assign] def assert_same_files(self, flist1: Iterable[str], flist2: Iterable[str]) -> None: """Assert that `flist1` and `flist2` are the same set of file names.""" |