Skip to content
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

Merge typeshed return annotations #4744

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Nov 10, 2024

Summary of changes

Based on #4736, so merge that one first.

Step 6.2 of #2345 (comment)

This PR still doesn't do initialize_options as those have their own set of issues (and knowing they return None isn't that helpful to begin with), as well as complex Command-based overloads.

This will produce many type issues that need to be resolved. I'll do that in other PRs and keep this as draft in the mean time.

Pull Request Checklist

  • Changes have tests (type checkers, and this increases static type-checking coverage)
  • News fragment added in newsfragments/. (not public facing yet)
    (See documentation for details)

@Avasam Avasam marked this pull request as draft November 10, 2024 23:10
@Avasam Avasam changed the title ANN204 (missing return type for special methods) autofixes Merge typeshed return annotations Nov 10, 2024
Comment on lines +269 to +270
# We shouldn't find any non-pyc files in __pycache__
assert m is not None
Copy link
Contributor Author

@Avasam Avasam Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

def run(self) -> None:
def run(self):
Copy link
Contributor Author

@Avasam Avasam Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant