Closed
Description
Running python.exe -m mypy .
on a directory where there's a script with from os import EX_OK
leads to an error on Windows:
pdfcomments\__main__.py:20: error: Module "os" has no attribute "EX_OK"; maybe "X_OK"? [attr-defined]
stdlib/os/__init__.pyi
contains a type hint for EX_OK
that is guarded by an if sys.platform != "win32"
block. However, since python/cpython@19459f8, EX_OK
has been supported on Windows. It should be placed outside the guard block.