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

Conformance tests: Fix pyright scoring for protocols_variance #1702

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

JelleZijlstra
Copy link
Member

Pyright produces warnings instead of errors for many issues in this test case.

Part of #1692

Pyright produces warnings instead of errors for many issues in this test case.

Part of python#1692
@@ -18,3 +18,4 @@ qualifiers_final_decorator.py:126:5 - error: Function "func1" cannot be marked @
conformance_automated = "Pass"
errors_diff = """
"""
ignore_errors = ["reportMissingModuleSource"]
Copy link
Member Author

Choose a reason for hiding this comment

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

Pyright (and several others) don't actually pick up the _qualifiers_final_decorator.pyi stub file. Leaving that for another day.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure what you mean by "don't actually pick up the stub file". Can you elaborate? I'm seeing pyright resolve the import with the stub file when I run the test. Are you seeing something different?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I misinterpreted the pyright error; I thought it meant pyright couldn't find the file at all, but it seems like it means only that pyright couldn't find the .py file, but it picked up the .pyi correctly.

It does appear that pytype can't resolve the import (File "qualifiers_final_decorator.py", line 8, in <module>: Couldn't import pyi for '_qualifiers_final_decorator' [pyi-error]), but all other type checkers are fine. Pytype also fails this test for other reasons, so we don't need to worry about that yet.

@JelleZijlstra JelleZijlstra merged commit 3998da0 into python:main Apr 9, 2024
4 checks passed
@JelleZijlstra JelleZijlstra deleted the protovariance branch April 9, 2024 09:20
JelleZijlstra added a commit to JelleZijlstra/typing that referenced this pull request Apr 11, 2024
…#1702)

Pyright produces warnings instead of errors for many issues in this test case.

Part of python#1692
@JelleZijlstra JelleZijlstra restored the protovariance branch September 10, 2024 23:39
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.

2 participants