Skip to content

Remove old type-ignore explanation comments not removed in #8280 #11513

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

Merged

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Feb 29, 2024

#8280 removed some redundant #type: ignore, but not the associated comments.

@@ -98,7 +98,6 @@ class object:
__annotations__: dict[str, Any]
@property
def __class__(self) -> type[Self]: ...
# Ignore errors about type mismatch between property getter and setter
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Noticed by @Akuli in #11496 (comment)
Added in #5092

@@ -93,7 +93,6 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):

class KeyedRef(ref[_T], Generic[_KT, _T]):
key: _KT
# This __new__ method uses a non-standard name for the "cls" parameter
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in #5092

@@ -241,7 +241,6 @@ class MetadataPathFinder(DistributionFinder):
@classmethod
def find_distributions(cls, context: DistributionFinder.Context = ...) -> Iterable[PathDistribution]: ...
if sys.version_info >= (3, 10):
# Yes, this is an instance method that has a parameter named "cls"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in #6443

Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't feel strongly, but this one is kind of funny and might help a human who is quickly glancing at stubs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have no issue leaving it in if you feel it has value outside of explaining a type: ignore comment

This comment has been minimized.

@@ -241,7 +241,6 @@ class MetadataPathFinder(DistributionFinder):
@classmethod
def find_distributions(cls, context: DistributionFinder.Context = ...) -> Iterable[PathDistribution]: ...
if sys.version_info >= (3, 10):
# Yes, this is an instance method that has a parameter named "cls"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't feel strongly, but this one is kind of funny and might help a human who is quickly glancing at stubs

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit 2116158 into python:main Mar 1, 2024
danieleades pushed a commit to danieleades/typeshed that referenced this pull request Mar 1, 2024
@Avasam Avasam deleted the type-ignore-explanation-comments-not-removed branch March 1, 2024 23:41
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.

3 participants