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

Fixed a bug that led to a confusing error message when assigning a va… #6107

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

erictraut
Copy link
Collaborator

…lue with an incompatible type to a class variable that has no explicit type declaration. This addresses #6106.

…lue with an incompatible type to a class variable that has no explicit type declaration. This addresses #6106.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

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

dd-trace-py (https://github.com/DataDog/dd-trace-py)
-     Member "_time_lapse" is unknown (reportGeneralTypeIssues)
+     Expression of type "float" cannot be assigned to member "_time_lapse" of class "deduplication"
+       "float" is incompatible with "int" (reportGeneralTypeIssues)
-     Member "TRUNCATE_LIMIT" is unknown (reportGeneralTypeIssues)
+     Expression of type "Literal[80]" cannot be assigned to member "TRUNCATE_LIMIT" of class "SubprocessCmdLine"
+       "Literal[80]" cannot be assigned to type "Literal[4096]" (reportGeneralTypeIssues)
-     Member "_CACHE_MAXSIZE" is unknown (reportGeneralTypeIssues)
+     Expression of type "Literal[2]" cannot be assigned to member "_CACHE_MAXSIZE" of class "SubprocessCmdLine"
+       "Literal[2]" cannot be assigned to type "Literal[32]" (reportGeneralTypeIssues)
-     Member "expected_path_prefix" is unknown (reportGeneralTypeIssues)
+     Expression of type "Literal['/v0.']" cannot be assigned to member "expected_path_prefix" of class "_APIEndpointRequestHandlerTest"
+       Type cannot be assigned to type "None" (reportGeneralTypeIssues)

@erictraut erictraut merged commit 08592ed into main Oct 9, 2023
11 checks passed
@erictraut erictraut deleted the issue6106 branch October 9, 2023 16:54
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