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

Issue 2781 #9380

Closed
wants to merge 3 commits into from
Closed

Issue 2781 #9380

wants to merge 3 commits into from

Conversation

erictraut
Copy link
Collaborator

No description provided.

…involving classes parameterized with a contravariant type variable. This addresses #9054.
…igned in an `__init_subclass__` or `__class_getitem__` method. These methods are implicitly class methods even though they are not decorated with `@classmethod`. This addresses microsoft/pylance-release#2781.
@erictraut erictraut closed this Nov 4, 2024
@erictraut erictraut deleted the issue-2781 branch November 4, 2024 16:45
Copy link
Contributor

github-actions bot commented Nov 4, 2024

Diff from mypy_primer, showing the effect of this PR on open source code:

ibis (https://github.com/ibis-project/ibis)
-   /tmp/mypy_primer/projects/ibis/ibis/common/tests/test_grounds.py:1072:17 - error: Cannot assign to attribute "kwargs" for class "type[Test]*"
-     Attribute "kwargs" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/ibis/ibis/common/tests/test_grounds.py:1077:18 - error: Cannot access attribute "kwargs" for class "type[Test2]"
-     Attribute "kwargs" is unknown (reportAttributeAccessIssue)
- 7298 errors, 126 warnings, 0 informations 
+ 7296 errors, 126 warnings, 0 informations 

scikit-learn (https://github.com/scikit-learn/scikit-learn)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_set_output.py:371:17 - error: Cannot assign to attribute "_sklearn_auto_wrap_output_keys" for class "type[_SetOutputMixin]*"
-     Attribute "_sklearn_auto_wrap_output_keys" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_set_output.py:379:13 - error: Cannot assign to attribute "_sklearn_auto_wrap_output_keys" for class "type[_SetOutputMixin]*"
-     Attribute "_sklearn_auto_wrap_output_keys" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_set_output.py:384:17 - error: Cannot access attribute "_sklearn_auto_wrap_output_keys" for class "type[_SetOutputMixin]*"
-     Attribute "_sklearn_auto_wrap_output_keys" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/tests/test_set_output.py:313:13 - error: Cannot assign to attribute "custom_parameter" for class "type[AnotherMixin]*"
-     Attribute "custom_parameter" is unknown (reportAttributeAccessIssue)
- 13584 errors, 16 warnings, 0 informations 
+ 13580 errors, 16 warnings, 0 informations 

attrs (https://github.com/python-attrs/attrs)
- /tmp/mypy_primer/projects/attrs/tests/test_init_subclass.py
-   /tmp/mypy_primer/projects/attrs/tests/test_init_subclass.py:20:17 - error: Cannot assign to attribute "param" for class "type[Base]*"
-     Attribute "param" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/attrs/tests/test_init_subclass.py:37:17 - error: Cannot assign to attribute "param" for class "type[Base]*"
-     Attribute "param" is unknown (reportAttributeAccessIssue)
- 996 errors, 44 warnings, 5 informations 
+ 994 errors, 44 warnings, 5 informations 

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