Skip to content

Update pyright CI test to use the latest version of pyright (1.1.118). #5092

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
merged 3 commits into from
Mar 5, 2021

Conversation

erictraut
Copy link
Contributor

Enable all but one of pyright's strictest checks. Add a "# type: ignore" to __new__ method in weakref.KeyRef because it uses a non-standard name for the cls parameter, which is flagged as an error by pyright.

…. Enable all but one of pyright's strictest checks. Add a "# type: ignore" to `__new__` method in `weakref.KeyRef` because it uses a non-standard name for the `cls` parameter, which is flagged as an error by pyright.
@@ -89,7 +89,7 @@ class object:
@property
def __class__(self: _T) -> Type[_T]: ...
@__class__.setter
def __class__(self, __type: Type[object]) -> None: ... # noqa: F811
def __class__(self, __type: Type[object]) -> None: ... # type: ignore # noqa: F811
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to add a comment explaining what is being ignored here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I can do that. There didn't seem to be a precedent for this, which is why I initially left it out.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! I think it's helpful in the future for documenting why we have these type ignores.

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