diff options
-rw-r--r-- | coverage/execfile.py | 2 | ||||
-rw-r--r-- | tests/coveragetest.py | 6 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/coverage/execfile.py b/coverage/execfile.py index 66cf931c..ef0277d6 100644 --- a/coverage/execfile.py +++ b/coverage/execfile.py @@ -294,7 +294,7 @@ def make_code_from_py(filename: str) -> CodeType: except (OSError, NoSource) as exc: raise NoSource(f"No file to run: '{filename}'") from exc - return compile(source, filename, "exec", dont_inherit=True) # type: ignore[no-any-return] + return compile(source, filename, "exec", dont_inherit=True) def make_code_from_pyc(filename: str) -> CodeType: 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.""" @@ -4,7 +4,7 @@ [tox] # When changing this list, be sure to check the [gh] list below. # PYVERSIONS -envlist = py{37,38,39,310,311,312}, pypy3, doc, lint +envlist = py{37,38,39,310,311,312}, pypy3, doc, lint, mypy skip_missing_interpreters = {env:COVERAGE_SKIP_MISSING_INTERPRETERS:True} toxworkdir = {env:TOXWORKDIR:.tox} |