I'm trying to add more mypy type annotations to my existing codebase. I have a file that uses a lot of bs4.
When I run the mypy checker on this file I get the error:
error: Skipping analyzing "bs4": module is installed, but missing library stubs or py.typed marker
In the mypy docs on "Missing library stubs" it says:
Mypy will not try inferring the types of any 3rd party libraries you have installed unless they either have declared themselves to be PEP 561 compliant stub package (e.g. with a py.typed file) or have registered themselves on typeshed, the repository of types for the standard library and some 3rd party libraries.
But when I look on typeshed, there is a set of stubs. How do I fix that error and tell it to look at the stub definition from typeshed?
BS4 and mypy are both running the latest version.
This question asks a similar question about black, but when I test black in my code mypy doesn't complain but it seems that they've solved it in a different way as there's no black stub in typeshed.