Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few possible reasons why MyPy might not be able to identify types in your locally installed package:

  1. MyPy is not finding the package: MyPy may not be able to find the package if it is not installed in the correct location or if the path to the package is not specified correctly in MyPy's configuration file.

  2. The package does not have type annotations: If the code in the package does not have proper type annotations, MyPy will not be able to infer the types. Make sure your package has proper type annotations and that the annotations are up-to-date with the latest version of your code.

  3. The package dependencies are not installed: If the package you are trying to import has dependencies that are not installed, MyPy may not be able to identify the types. Make sure all the required dependencies are installed and up-to-date.

  4. The MyPy configuration is incorrect: MyPy's configuration may need to be updated to include the necessary paths for your local package. Check the configuration file to ensure that the necessary paths are included.

  5. A bug in MyPy: If none of the above reasons apply, there may be a bug in MyPy that is preventing it from identifying the types in your package. In this case, you may need to submit a bug report to the MyPy developers.