-
Notifications
You must be signed in to change notification settings - Fork 76
Merge typeshed's setuptools._distutils
annotations
#329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add a few missing
Another missing
…ypeshed-annotations
@deprecated("format_commands is now a dict. append is deprecated.") | ||
def append(self, item: object) -> None: | ||
warnings.warn( | ||
"""format_commands is now a dict. append is deprecated.""", | ||
"format_commands is now a dict. append is deprecated.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for introducing me to this technique. I don't love it, because it's duplicative and adds a lot of boilerplate in the import section, but if this is the best practice, let's keep it.
Aouch, that's an ugly commit history, that one could've used a squash ^^" Oh well... |
😬 I tend not to squash merge except when flagged specifically (because a squash is an irreversible rewrite of history that can mask real issues). I don't mind the history, though I do sometimes squash and/or rewrite the history for a nicer story. Honestly, I'd not worry too much about it. The merge commit itself reflects the PR and anyone uninterested in the details can just follow the first parent. |
Merges the annotations from: https://github.com/python/typeshed/tree/main/stubs/setuptools/setuptools/_distutils
This should allow typeshed to not have to expose and duplicate the private module to add types, instead referencing it directly in https://github.com/python/typeshed/tree/main/stubs/setuptools/distutils
It'll also improve base types for setuptools in pypa/setuptools#4689 / pypa/setuptools#4704
PathLike
unions are repeated often, I could do like I did in setuptools and create runtime aliases: https://github.com/pypa/setuptools/blob/main/setuptools/_path.py