Merge typeshed return annotations#4744
Conversation
fb5487b to
aa0ad57
Compare
| # We shouldn't find any non-pyc files in __pycache__ | ||
| assert m is not None |
There was a problem hiding this comment.
Not strictly an annotation change, but I included it here because it didn't feel worth doing a PR just for this
Would've been included in #4753 if I realised sooner this was an easy fix
| return tag | ||
|
|
||
| def run(self) -> None: | ||
| def run(self): |
There was a problem hiding this comment.
I opted out of annotating this specific run in this PR for the same reason I didn't do initialize_options.
(note that I'm commenting on a specific commit, this PR doesn't remove any return annotation)
8cba3e1 to
5a26893
Compare
abravalheri
left a comment
There was a problem hiding this comment.
Thank you very much Avasam.
I have some minor comments that I missed last time.
|
|
||
| def run(self): | ||
| cmd = ( | ||
| def run(self) -> None: # type: ignore[override] # Not including easy_install's show_deprecation argument |
There was a problem hiding this comment.
I am trying to understand this comment.
Maybe it is also a left over from merge/rebase from a time that develop extended easy_install before the recent removal in #4955?
There was a problem hiding this comment.
Indeed, this type-ignore no longer applies. This used to break the Liskov Substitution Principle.
I think we're not currently checking for unused type-ignores because of some inconsistent error codes with Python 3.8 and/or distutils.
|
Thanks for the reviews @abravalheri ! Only a few steps left until setuptool's public interface is on-par with TypeShed's stubs. Whilst benefiting from type-checking internally. |
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
Summary of changes
Based on #4736, so merge that one first.DoneBlocked by setuptools/msvc.py dir methods and properties split off to #4755 for easier reviewDoneStep 6.2 of #2345 (comment)
This PR still doesn't do
initialize_optionsas those have their own set of issues (and knowing they returnNoneisn't that helpful to begin with), as well as complex Command-based overloads.Pull Request Checklist
newsfragments/. (not public facing yet)(See documentation for details)