Runtime typing fixes for typeshed return type merge#4753
Conversation
| def initialize_options(self) -> None: | ||
| self.bdist_dir: str | None = None | ||
| self.data_dir: str | None = None | ||
| self.data_dir = "" |
There was a problem hiding this comment.
data_dir is always set in finalize_options, so if I understand correctly this value doesn't matter and it'll always be a string.
| def build_module(self, module, module_file, package): | ||
| outfile, copied = orig.build_py.build_module(self, module, module_file, package) | ||
| if copied: | ||
| self.__updated_files.append(outfile) |
There was a problem hiding this comment.
Looks like __updated_files was completely unused, and its mangled
There was a problem hiding this comment.
I see, apparently it was introduced for the 2to3 transformation: 5b56888.
In this case, does it make sense to keep this method? (It will only call super() right?)
There was a problem hiding this comment.
You're right! I didn't even notice that. I'd remove the method entirely at this point.
There was a problem hiding this comment.
I agree, it is better to remove it.
f7445e7 to
593bf67
Compare
| def build_module(self, module, module_file, package): | ||
| outfile, copied = orig.build_py.build_module(self, module, module_file, package) | ||
| if copied: | ||
| self.__updated_files.append(outfile) |
There was a problem hiding this comment.
I see, apparently it was introduced for the 2to3 transformation: 5b56888.
In this case, does it make sense to keep this method? (It will only call super() right?)
| ) -> None: | ||
| """Same idea as :func:`_read_utf8_with_fallback`, but for the | ||
| :meth:`ConfigParser.read` method. | ||
| :meth:`RawConfigParser.read` method. |
There was a problem hiding this comment.
This also allows any subclass, right?
There was a problem hiding this comment.
Correct. Setuptools passes a RawConfigParser to this method, but ConfigParser, which is a subclass, will be statically allowed.
593bf67 to
9a4c8d4
Compare
Summary of changes
Runtime typing fixes for #4744 that shouldn't incur any functional change for the end-users.
Pull Request Checklist
newsfragments/. (not public-facing)(See documentation for details)