According to the python docs, SpooledTemporaryFile._file is an attribute: "The returned object is a file-like object whose _file attribute is either an io.BytesIO or io.TextIOWrapper object (depending on whether binary or text mode was specified)"
So the _file attribute should be added to tempfile.pyi for the SpooledTemporaryFile class.
According to the python docs,
SpooledTemporaryFile._fileis an attribute: "The returned object is a file-like object whose _file attribute is either an io.BytesIO or io.TextIOWrapper object (depending on whether binary or text mode was specified)"So the
_fileattribute should be added totempfile.pyifor theSpooledTemporaryFileclass.