I'm using Python 3.7.2 on Linux x64, mypy 0.660. This code doesn't pass mypy check:
import ssl
def t(x: ssl.Purpose):
pass
t(ssl.Purpose.CLIENT_AUTH)
CLIENT_AUTH should be compatible with ssl.Purpose:
>>> import ssl
>>> isinstance(ssl.Purpose.CLIENT_AUTH, ssl.Purpose)
True