Consider the following type stubs:
# foo/__init__.pyi
class Foo: ...
# foo/bar.pyi
from . import Foo
class Bar(Foo): ...
When parsing foo/bar.pyi, pytype fails with:
ParseError: Unexpected class base: Module(name='Foo', module_name='foo.Foo')
pytype erroneously assumes that Foo is a submodule. A workaround is to replace from . import Foo with from foo import Foo.
Context: python/typeshed#5192