-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Added special-case logic to detect when a class-like symbol created b… #10559
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
Closed
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
…y calling NewType is used as an actual class for assignability or member accesses. This addresses #10550.
Diff from mypy_primer, showing the effect of this PR on open source code: websockets (https://github.com/aaugustin/websockets)
+ ...:151:26 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
+ ...:161:50 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
+ ...
+ ...:61:22 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
+ ...:71:46 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
+ ...:137:22 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
+ ...:147:46 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
+ ...:234:26 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
+ ...:245:50 - error: Cannot access attribute "lower" for class "FunctionType"
+ Attribute "lower" is unknown (reportFunctionMemberAccess)
- 72 errors, 2 warnings, 0 informations
+ 80 errors, 2 warnings, 0 informations
sympy (https://github.com/sympy/sympy)
+ ...:540:50 - error: "Set" is not iterable
+ "__iter__" method not defined (reportGeneralTypeIssues)
- ...:2542:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
- Return type mismatch: base method returns type "None", override returns type "ComplexInfinity | NaN | Rational | Unknown"
- Type "ComplexInfinity | NaN | Rational | Unknown" is not assignable to type "None"
- "ComplexInfinity" is not assignable to "None" (reportIncompatibleMethodOverride)
- ...:2721:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
- Return type mismatch: base method returns type "None", override returns type "Expr | NaN | ComplexInfinity | Rational | Unknown"
- Type "Expr | NaN | ComplexInfinity | Rational | Unknown" is not assignable to type "None"
- "Expr" is not assignable to "None" (reportIncompatibleMethodOverride)
+ ...:261:48 - error: Cannot access attribute "doit" for class "tuple[Unknown, ...]"
+ Attribute "doit" is unknown (reportAttributeAccessIssue)
+ ...:261:48 - error: "doit" is not a known attribute of "None" (reportOptionalMemberAccess)
- ...:268:22 - error: Argument of type "Generator[Unknown | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
+ ...:268:22 - error: Argument of type "Generator[tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
- "Generator[Unknown | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
+ "Generator[tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
- Type parameter "_T_co@Iterable" is covariant, but "Unknown | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
+ Type parameter "_T_co@Iterable" is covariant, but "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
- Type "Unknown | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+ Type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
- Type "Unknown | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+ Type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
- "None" is incompatible with protocol "_SupportsSumWithNoDefaultGiven" (reportArgumentType)
+ "Basic" is incompatible with protocol "_SupportsSumWithNoDefaultGiven" (reportArgumentType)
- ...:138:17 - error: Argument of type "NaN | ComplexInfinity | Rational | Unknown | Expr" cannot be assigned to parameter "value" of type "int" in function "__setitem__"
- Type "NaN | ComplexInfinity | Rational | Unknown | Expr" is not assignable to type "int"
- "Expr" is not assignable to "int" (reportArgumentType)
+ ...:473:25 - error: Argument of type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | tuple[Unknown, ...] | Sum | NaN | Piecewise | Basic | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | int" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
+ Type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | tuple[Unknown, ...] | Sum | NaN | Piecewise | Basic | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | int" is not assignable to type "Expr | complex"
+ Type "Basic" is not assignable to type "Expr | complex"
+ "Basic" is not assignable to "Expr"
+ "Basic" is not assignable to "complex" (reportArgumentType)
+ ...:741:20 - error: "Set" is not iterable
+ "__iter__" method not defined (reportGeneralTypeIssues)
- ...:1839:25 - error: Argument of type "tuple[Unknown, ...] | Unknown | Sum | Expr | Any | Add | Zero | NaN | Piecewise | Basic | Integral | int | None" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
+ ...:1839:25 - error: Argument of type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | Integral | Any | int | None" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
- Type "tuple[Unknown, ...] | Unknown | Sum | Expr | Any | Add | Zero | NaN | Piecewise | Basic | Integral | int | None" is not assignable to type "Expr | complex"
+ Type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | Integral | Any | int | None" is not assignable to type "Expr | complex"
+ ...:1894:27 - error: Cannot access attribute "doit" for class "tuple[Unknown, ...]"
+ Attribute "doit" is unknown (reportAttributeAccessIssue)
- Return type mismatch: base method returns type "Self@Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Self@Expectation | Literal[0] | None"
+ Return type mismatch: base method returns type "Self@Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Self@Expectation | Literal[0] | None"
- Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Expectation* | Literal[0] | None" is not assignable to type "Basic"
+ Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Expectation* | Literal[0] | None" is not assignable to type "Basic"
- ...:74:9 - error: Method "doit" overrides class "Basic" in an incompatible manner
- Return type mismatch: base method returns type "Basic", override returns type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | ComplexInfinity | Expr | Float | Infinity | Integer | Lambda | NaN | NegativeInfinity | NegativeOne | Number | Piecewise | Rational | Integral | Literal[0]"
- Type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | ComplexInfinity | Expr | Float | Infinity | Integer | Lambda | NaN | NegativeInfinity | NegativeOne | Number | Piecewise | Rational | Integral | Literal[0]" is not assignable to type "Basic"
- "Literal[0]" is not assignable to "Basic" (reportIncompatibleMethodOverride)
+ ...:123:27 - error: Cannot access attribute "doit" for class "tuple[Unknown, ...]"
+ Attribute "doit" is unknown (reportAttributeAccessIssue)
- Return type mismatch: base method returns type "Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Literal[0] | None"
+ Return type mismatch: base method returns type "Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Literal[0] | None"
- Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Literal[0] | None" is not assignable to type "Basic"
+ Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Literal[0] | None" is not assignable to type "Basic"
+ ...:41:21 - error: Cannot access attribute "simplify" for class "tuple[Unknown, ...]"
+ Attribute "simplify" is unknown (reportAttributeAccessIssue)
+ ...:41:21 - error: "simplify" is not a known attribute of "None" (reportOptionalMemberAccess)
- ...:366:12 - error: Operator "-" not supported for types "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" and "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None"
+ ...:366:12 - error: Operator "-" not supported for types "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" and "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None"
- ...:414:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
+ ...:414:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
- Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"
+ Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"
... (truncated 1921 lines) ...
pyodide (https://github.com/pyodide/pyodide)
+ ...
+ ...:90:27 - error: Cannot access attribute "replace" for class "FunctionType"
+ Attribute "replace" is unknown (reportFunctionMemberAccess)
+ ...:542:26 - error: Cannot access attribute "startswith" for class "FunctionType"
+ Attribute "startswith" is unknown (reportFunctionMemberAccess)
+ ...:121:37 - error: Cannot access attribute "replace" for class "FunctionType"
+ Attribute "replace" is unknown (reportFunctionMemberAccess)
- 815 errors, 15 warnings, 0 informations
+ 818 errors, 15 warnings, 0 informations
bokeh (https://github.com/bokeh/bokeh)
+ ...
+ ...:180:64 - error: Cannot access attribute "replace" for class "FunctionType"
+ Attribute "replace" is unknown (reportFunctionMemberAccess)
+ ...:295:61 - error: Cannot access attribute "replace" for class "FunctionType"
+ Attribute "replace" is unknown (reportFunctionMemberAccess)
- 1051 errors, 51 warnings, 0 informations
+ 1053 errors, 51 warnings, 0 informations
strawberry (https://github.com/strawberry-graphql/strawberry)
+ ...:153:49 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+ ...:154:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- ...:158:40 - error: Cannot access attribute "pop" for class "_Any"
- Attribute "pop" is unknown (reportAttributeAccessIssue)
- ...:171:21 - error: "__setitem__" method not defined on type "_Any" (reportIndexIssue)
- ...:174:50 - error: Argument expression after ** must be a mapping with a "str" key type (reportCallIssue)
+ ...
+ ...:5:17 - error: Argument of type "type[Upload]" cannot be assigned to parameter "cls" of type "_T@scalar" in function "scalar"
+ Type "FunctionType" is not assignable to type "type"
+ "FunctionType" is not assignable to "type" (reportArgumentType)
+ ...:18:5 - error: Argument of type "type[JSON]" cannot be assigned to parameter "cls" of type "_T@scalar" in function "scalar"
+ Type "FunctionType" is not assignable to type "type"
+ "FunctionType" is not assignable to "type" (reportArgumentType)
+ ...:32:5 - error: Argument of type "type[Base16]" cannot be assigned to parameter "cls" of type "_T@scalar" in function "scalar"
+ Type "FunctionType" is not assignable to type "type"
+ "FunctionType" is not assignable to "type" (reportArgumentType)
+ ...:40:5 - error: Argument of type "type[Base32]" cannot be assigned to parameter "cls" of type "_T@scalar" in function "scalar"
+ Type "FunctionType" is not assignable to type "type"
+ "FunctionType" is not assignable to "type" (reportArgumentType)
+ ...:50:5 - error: Argument of type "type[Base64]" cannot be assigned to parameter "cls" of type "_T@scalar" in function "scalar"
+ Type "FunctionType" is not assignable to type "type"
+ "FunctionType" is not assignable to "type" (reportArgumentType)
+ ...
+ ...:808:37 - error: Argument of type "type[ID]" cannot be assigned to parameter "scalar" of type "type" in function "from_scalar"
+ "FunctionType" is not assignable to "type" (reportArgumentType)
- 378 errors, 69 warnings, 0 informations
+ 383 errors, 69 warnings, 0 informations
pydantic (https://github.com/pydantic/pydantic)
+ ...:2189:25 - error: Cannot access attribute "startswith" for class "FunctionType"
+ Attribute "startswith" is unknown (reportFunctionMemberAccess)
+ ...:2370:38 - error: Cannot access attribute "startswith" for class "FunctionType"
+ Attribute "startswith" is unknown (reportFunctionMemberAccess)
+ ...
- 11 errors, 0 warnings, 0 informations
+ 13 errors, 0 warnings, 0 informations
hydpy (https://github.com/hydpy-dev/hydpy)
+ ...:1564:57 - error: Cannot access attribute "split" for class "FunctionType"
+ Attribute "split" is unknown (reportFunctionMemberAccess)
- 1388 errors, 71 warnings, 0 informations
+ 1389 errors, 71 warnings, 0 informations
scikit-build-core (https://github.com/scikit-build/scikit-build-core)
+ ...
+ ...:124:42 - error: Cannot access attribute "replace" for class "FunctionType"
+ Attribute "replace" is unknown (reportFunctionMemberAccess)
- 21 errors, 22 warnings, 0 informations
+ 22 errors, 22 warnings, 0 informations
core (https://github.com/home-assistant/core)
+ ...:251:46 - error: Cannot access attribute "match" for class "FunctionType"
+ Attribute "match" is unknown (reportFunctionMemberAccess)
+ ...:266:29 - error: Cannot access attribute "startswith" for class "FunctionType"
+ Attribute "startswith" is unknown (reportFunctionMemberAccess)
+ ...:269:31 - error: Cannot access attribute "startswith" for class "FunctionType"
+ Attribute "startswith" is unknown (reportFunctionMemberAccess)
- 69780 errors, 298 warnings, 0 informations
+ 69783 errors, 298 warnings, 0 informations
pip (https://github.com/pypa/pip)
+ ...
+ ...:59:40 - error: Cannot access attribute "startswith" for class "FunctionType"
+ Attribute "startswith" is unknown (reportFunctionMemberAccess)
+ ...:463:21 - error: Cannot access attribute "endswith" for class "FunctionType"
+ Attribute "endswith" is unknown (reportFunctionMemberAccess)
+ ...:521:21 - error: Cannot access attribute "split" for class "FunctionType"
+ Attribute "split" is unknown (reportFunctionMemberAccess)
+ ...:531:22 - error: Cannot access attribute "split" for class "FunctionType"
+ Attribute "split" is unknown (reportFunctionMemberAccess)
+ ...
+ ...:59:26 - error: Cannot access attribute "startswith" for class "FunctionType"
+ Attribute "startswith" is unknown (reportFunctionMemberAccess)
- 1627 errors, 24 warnings, 0 informations
+ 1632 errors, 24 warnings, 0 informations
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ ...
+ ...:172:23 - error: Cannot access attribute "count" for class "FunctionType"
+ Attribute "count" is unknown (reportFunctionMemberAccess)
+ ...:173:30 - error: Cannot access attribute "replace" for class "FunctionType"
+ Attribute "replace" is unknown (reportFunctionMemberAccess)
- 10 errors, 0 warnings, 183 informations
+ 12 errors, 0 warnings, 183 informations
spark (https://github.com/apache/spark)
- ...:181:60 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:181:60 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:207:58 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:207:58 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:237:58 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:237:58 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:246:58 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:246:58 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:260:84 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:260:84 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:275:30 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:275:30 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:399:62 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:399:62 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:535:35 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:535:35 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:545:35 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:545:35 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:556:32 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:556:32 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:571:26 - error: Cannot access attribute "func" for class "GroupedMapPandasUserDefinedFunction"
+ ...:571:26 - error: Cannot access attribute "func" for class "FunctionType"
- Attribute "func" is unknown (reportAttributeAccessIssue)
+ Attribute "func" is unknown (reportFunctionMemberAccess)
- ...:67:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:67:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:68:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:68:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:73:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:73:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:74:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:74:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:86:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:86:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:87:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:87:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:90:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:90:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:91:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:91:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:94:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:94:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:95:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:95:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:98:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:98:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:99:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:99:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:102:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:102:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:103:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:103:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:108:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:108:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:109:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:109:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:132:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:132:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:133:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:133:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
- ...:139:30 - error: Cannot access attribute "returnType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:139:30 - error: Cannot access attribute "returnType" for class "FunctionType"
- Attribute "returnType" is unknown (reportAttributeAccessIssue)
+ Attribute "returnType" is unknown (reportFunctionMemberAccess)
- ...:140:30 - error: Cannot access attribute "evalType" for class "GroupedMapPandasUserDefinedFunction"
+ ...:140:30 - error: Cannot access attribute "evalType" for class "FunctionType"
- Attribute "evalType" is unknown (reportAttributeAccessIssue)
+ Attribute "evalType" is unknown (reportFunctionMemberAccess)
... (truncated 16 lines) ...
mypy (https://github.com/python/mypy)
+ ...:948:33 - error: Cannot access attribute "copy_modified" for class "FunctionType"
+ Attribute "copy_modified" is unknown (reportFunctionMemberAccess)
+ ...:948:84 - error: Cannot access attribute "arg_types" for class "FunctionType"
+ Attribute "arg_types" is unknown (reportFunctionMemberAccess)
+ ...:952:21 - error: Argument of type "CallableType | NormalizedCallableType | None" cannot be assigned to parameter "left" of type "CallableType" in function "is_callable_compatible"
+ Type "CallableType | NormalizedCallableType | None" is not assignable to type "CallableType"
+ "None" is not assignable to "CallableType" (reportArgumentType)
+ ...:958:52 - error: "ret_type" is not a known attribute of "None" (reportOptionalMemberAccess)
+ ...:958:52 - error: Cannot access attribute "ret_type" for class "FunctionType"
+ Attribute "ret_type" is unknown (reportFunctionMemberAccess)
+ ...:959:40 - error: "ret_type" is not a known attribute of "None" (reportOptionalMemberAccess)
+ ...:959:40 - error: Cannot access attribute "ret_type" for class "FunctionType"
+ Attribute "ret_type" is unknown (reportFunctionMemberAccess)
+ ...:1668:48 - error: Cannot access attribute "with_normalized_var_args" for class "FunctionType"
+ Attribute "with_normalized_var_args" is unknown (reportFunctionMemberAccess)
+ ...:1084:52 - error: Cannot access attribute "with_normalized_var_args" for class "FunctionType"
+ Attribute "with_normalized_var_args" is unknown (reportFunctionMemberAccess)
+ ...:1088:58 - error: Cannot access attribute "with_normalized_var_args" for class "FunctionType"
+ Attribute "with_normalized_var_args" is unknown (reportFunctionMemberAccess)
+ ...:1150:66 - error: Argument of type "CallableType" cannot be assigned to parameter "template" of type "NormalizedCallableType | Parameters" in function "infer_callable_arguments_constraints"
+ Type "CallableType" is not assignable to type "NormalizedCallableType | Parameters"
+ "CallableType" is not assignable to "NormalizedCallableType"
+ "CallableType" is not assignable to "Parameters" (reportArgumentType)
+ ...:1632:22 - error: Cannot access attribute "var_arg" for class "FunctionType"
+ Attribute "var_arg" is unknown (reportFunctionMemberAccess)
+ ...:1633:23 - error: Cannot access attribute "kw_arg" for class "FunctionType"
+ Attribute "kw_arg" is unknown (reportFunctionMemberAccess)
+ ...:1634:24 - error: Cannot access attribute "var_arg" for class "FunctionType"
... (truncated 148 lines) ...``` |
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.
…y calling NewType is used as an actual class for assignability or member accesses. This addresses #10550.