-
Notifications
You must be signed in to change notification settings - Fork 92
update find all references to find where classes are instantiated from __init__ and __new__ methods
#1415
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…m `__init__` and `__new__` methods
ceb5383 to
5585d17
Compare
|
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
- Type of "cse" is "(exprs: Unknown, symbols: Unknown | None = None, optimizations: Unknown | None = None, postprocess: Unknown | None = None, order: str = 'canonical', ignore: Unknown = (), list: bool = True) -> (tuple[Unknown | list[tuple[Unknown, Unknown]], str] | tuple[Unknown | list[tuple[Unknown, Unknown]], list[Unknown] | set[Unknown] | tuple[Unknown, ...]] | tuple[Unknown | list[tuple[Unknown, Unknown]], dict[Unknown, Unknown]] | tuple[Unknown | list[tuple[Unknown, Unknown]], Unknown] | tuple[list[Unknown], Unknown] | tuple[list[tuple[Unknown, Unknown]], list[Unknown]] | Unknown)" (reportUnknownVariableType)
+ Type of "cse" is "(exprs: Unknown, symbols: Unknown | None = None, optimizations: Unknown | None = None, postprocess: Unknown | None = None, order: str = 'canonical', ignore: Unknown = (), list: bool = True) -> (tuple[Unknown, str] | tuple[Unknown | list[tuple[Unknown, Unknown]], list[Unknown] | set[Unknown] | tuple[Unknown, ...]] | tuple[Unknown | list[tuple[Unknown, Unknown]], dict[Unknown, Unknown]] | tuple[Unknown | list[tuple[Unknown, Unknown]], Unknown] | tuple[list[Unknown], Unknown] | tuple[list[tuple[Unknown, Unknown]], list[Unknown]] | Unknown)" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:91:15 - warning: Type of "red42" is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:91:15 - warning: Type of "red42" is partially unknown
+ Type of "red42" is "str | Unknown" (reportUnknownVariableType)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:93:18 - warning: Type of "red_half" is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:93:18 - warning: Type of "red_half" is partially unknown
+ Type of "red_half" is "str | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:104:23 - error: "__getitem__" method not defined on type "set[Unknown]" (reportIndexIssue)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:106:15 - warning: Type of "red42" is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:106:15 - warning: Type of "red42" is partially unknown
+ Type of "red42" is "str | Unknown" (reportUnknownVariableType)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:108:18 - warning: Type of "red_half" is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:108:18 - warning: Type of "red_half" is partially unknown
+ Type of "red_half" is "str | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "_" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "_" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "_" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "_" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "_" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "_" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:252:5 - warning: Type of "cse_expr" is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:252:5 - warning: Type of "cse_expr" is partially unknown
+ Type of "cse_expr" is "str | Unknown" (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:252:16 - error: "__getitem__" method not defined on type "set[Unknown]" (reportIndexIssue)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:253:21 - error: Cannot access attribute "free_symbols" for class "str"
+ Attribute "free_symbols" is unknown (reportAttributeAccessIssue)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:262:16 - warning: Type of "expr" is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:262:16 - warning: Type of "expr" is partially unknown
+ Type of "expr" is "str | Unknown" (reportUnknownVariableType)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:270:16 - warning: Type of "expr" is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:270:16 - warning: Type of "expr" is partially unknown
+ Type of "expr" is "str | Unknown" (reportUnknownVariableType)
- Type of "c" is "Unknown | tuple[list[tuple[Unknown, Unknown]], list[Unknown]]" (reportUnknownVariableType)
+ Type of "c" is "tuple[Unknown, str] | tuple[Unknown | list[tuple[Unknown, Unknown]], list[Unknown] | set[Unknown] | tuple[Unknown, ...]] | tuple[Unknown | list[tuple[Unknown, Unknown]], dict[Unknown, Unknown]] | tuple[Unknown | list[tuple[Unknown, Unknown]], Unknown] | tuple[list[Unknown], Unknown] | tuple[list[tuple[Unknown, Unknown]], list[Unknown]] | Unknown" (reportUnknownVariableType)
- Type of "r" is "Unknown | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Expr" (reportUnknownVariableType)
+ Type of "r" is "Unknown | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr" (reportUnknownVariableType)
- Type of "reduced_exprs" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced_exprs" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced_exprs" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced_exprs" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced_exprs" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced_exprs" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "reduced_exprs" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced_exprs" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
- Type of "ans" is "Unknown | tuple[list[tuple[Unknown, Unknown]], list[Unknown]]" (reportUnknownVariableType)
+ Type of "ans" is "tuple[Unknown, str] | tuple[Unknown | list[tuple[Unknown, Unknown]], list[Unknown] | set[Unknown] | tuple[Unknown, ...]] | tuple[Unknown | list[tuple[Unknown, Unknown]], dict[Unknown, Unknown]] | tuple[Unknown | list[tuple[Unknown, Unknown]], Unknown] | tuple[list[Unknown], Unknown] | tuple[list[tuple[Unknown, Unknown]], list[Unknown]] | Unknown" (reportUnknownVariableType)
- Type of "reduced" is "Unknown | list[Unknown]" (reportUnknownVariableType)
+ Type of "reduced" is "str | list[Unknown] | set[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
+ .../projects/sympy/sympy/simplify/tests/test_cse.py:399:15 - error: Cannot access attribute "subs" for class "str"
+ Attribute "subs" is unknown (reportAttributeAccessIssue)
- .../projects/sympy/sympy/simplify/tests/test_cse.py:399:42 - warning: Type of "e" is unknown (reportUnknownVariableType)
... (truncated 6886 lines) ...
|
__init__ and __new__ methods
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1271