Closed Newbytee closed 6 months ago
# It also occurs with:
import wx
I don't think wxpython provides stub files. You should ignore the error by writing the following in your configuration file:
[mypy-wx.*]
ignore_missing_imports = True
see also: https://mypy.readthedocs.io/en/stable/config_file.html
Thanks, the codebase I encountered this in must be doing something to suppress that error (not sure what exactly though, can't find any mypy configuration file).
Operating system: Ubuntu 22.04.3 LTS wxPython version & source: 4.2.1, pypi Python version & source: 3.10.12, Ubuntu's package repositories
Description of the problem:
I'm making an application with wxPython, and to debug problems I use the inspection tool. To help with refactoring among other things, I use mypy to ensure that all the types are correct. However, with the
wx.lib.inspection
module, this does not work as I would expect. When running mypy on my code that includes this module, it says this:I don't think this could be something I'm doing wrong given that I can reproduce this by just importing a single module.
Code Example (click to expand)
```python # Yes, this is really it. import wx.lib.inspection ```