Until set_version is called, instances of MyClass still don't have a "version" attribute. If you call get_version before set_version, you'll get a type error. Pytype is correct to produce an error here because there is no way to prove that get_version will always be called before set_version.
(There's also an argument to be made that MyPy is correct here, because `self.version: int` proves you intend for MyClass to have a self.version attribute, and MyPy assumes you'll initialize self.version later. The typing standard for Python doesn't say either interpretation is correct.)