### What did you do? ```py from PIL import Image def foo(img: Image) -> None: ... ``` and got `Module "PIL.Image" is not valid as a typemypy(error)`. ### What did you expect to happen? functions such as `Image.open` are classmethod of class `Image`. ### What actually happened? `Image` was actually an module, so for typing you need to type `Image.Image`, such as ```py from PIL import Image def foo(img: Image.Image) -> None: ... ``` ### What are your OS, Python and Pillow versions? * OS: Ubuntu 22.04 * Python: Python 3.11.0rc2 * Pillow: Name: Pillow-SIMD 9.0.0.post1