A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nedbat/coveragepy/issues/1564 below:

Mypy cannot find the Coverage type from version `7.2.0` · Issue #1564 · nedbat/coveragepy · GitHub

Describe the bug

Mypy complains about not being able to find the Coverage attribute from the coverage module.

To Reproduce

Following the documentation:

import coverage

cov = coverage.Coverage()

and applying mypy leads to the following error:

error: "Module coverage" does not explicitly export attribute "Coverage"  [attr-defined]

However, doing:

import coverage

cov = coverage.control.Coverage()

works fine.

Expected behavior

Mypy should not complain about the type when Coverage objects are used according to the documentation.

Additional context

This problem appeared starting 7.2.0 (using 7.1.0 works fine).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4