Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To add to pyproject.toml to disregard absent library stubs for mypy, you can use the ignore_missing_imports setting. Here are the steps to follow:

  1. Open your pyproject.toml file.
  2. Add the following section to the file, if it does not already exist:

    [mypy]
    
  3. Add the following line to the mypy section to ignore missing imports:

    ignore_missing_imports = true
    
  4. Save the pyproject.toml file.

This setting tells mypy to ignore any missing import errors, including missing library stubs. This can be useful when working with external libraries that do not have stubs available or when using third-party packages that have incomplete type annotations.