There's a long discussion on this topic in the mypy tracker: https://github.com/python/mypy/issues/1141 I'm surfacing it here because I can never remember whether that discussion is here, or in the typeshed repo, or in the mypy tracker. (Adding str, bytes, unicode, Text, basestring as additional search keywords.)