-
Notifications
You must be signed in to change notification settings - Fork 102
infer type of overload impl #1528
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
Draft
KotlinIsland
wants to merge
1
commit into
main
Choose a base branch
from
infer-overloads
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+233
−1
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
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: aioredis (https://github.com/aio-libs/aioredis)
- .../projects/aioredis/aioredis/client.py:4114:55 - error: Type "dict[ChannelT, Any | None]" is not assignable to declared type "Dict[ChannelT, PubSubHandler]"
+ .../projects/aioredis/aioredis/client.py:4114:55 - error: Type "dict[KeyT, Any | None]" is not assignable to declared type "Dict[ChannelT, PubSubHandler]"
- "dict[ChannelT, Any | None]" is not assignable to "Dict[ChannelT, PubSubHandler]"
+ "dict[KeyT, Any | None]" is not assignable to "Dict[ChannelT, PubSubHandler]"
- .../projects/aioredis/aioredis/client.py:4152:29 - error: Argument of type "dict[str, (...) -> Unknown]" cannot be assigned to parameter "m" of type "Iterable[tuple[ChannelT, Any | None]]" in function "update"
+ .../projects/aioredis/aioredis/client.py:4152:29 - error: Argument of type "dict[str, (...) -> Unknown]" cannot be assigned to parameter "m" of type "Iterable[tuple[KeyT, Any | None]]" in function "update"
- "dict[str, (...) -> Unknown]" is not assignable to "Iterable[tuple[ChannelT, Any | None]]"
+ "dict[str, (...) -> Unknown]" is not assignable to "Iterable[tuple[KeyT, Any | None]]"
- Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "tuple[ChannelT, Any | None]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "tuple[KeyT, Any | None]"
- "str" is not assignable to "tuple[ChannelT, Any | None]" (reportArgumentType)
+ "str" is not assignable to "tuple[KeyT, Any | None]" (reportArgumentType)
- .../projects/aioredis/aioredis/client.py:4158:30 - error: Argument of type "dict[ChannelT, Any | None]" cannot be assigned to parameter "m" of type "Iterable[tuple[ChannelT, PubSubHandler]]" in function "update"
+ .../projects/aioredis/aioredis/client.py:4158:30 - error: Argument of type "dict[KeyT, Any | None]" cannot be assigned to parameter "m" of type "Iterable[tuple[ChannelT, PubSubHandler]]" in function "update"
- "dict[ChannelT, Any | None]" is not assignable to "Iterable[tuple[ChannelT, PubSubHandler]]"
+ "dict[KeyT, Any | None]" is not assignable to "Iterable[tuple[ChannelT, PubSubHandler]]"
- Type parameter "_T_co@Iterable" is covariant, but "ChannelT" is not a subtype of "tuple[ChannelT, PubSubHandler]"
+ Type parameter "_T_co@Iterable" is covariant, but "KeyT" is not a subtype of "tuple[ChannelT, PubSubHandler]"
- Type "ChannelT" is not assignable to type "tuple[ChannelT, PubSubHandler]"
+ Type "KeyT" is not assignable to type "tuple[ChannelT, PubSubHandler]"
+ .../projects/aioredis/aioredis/connection.py:932:20 - error: Type "tuple[bytes, ...] | tuple[bytes | memoryview[int], ...] | tuple[bytes | str, ...] | tuple[bytes | int, ...] | tuple[bytes | float, ...]" is not assignable to declared type "tuple[bytes, ...] | tuple[memoryview[int], ...] | tuple[str, ...] | tuple[int, ...] | tuple[float, ...]"
+ Type "tuple[bytes, ...] | tuple[bytes | memoryview[int], ...] | tuple[bytes | str, ...] | tuple[bytes | int, ...] | tuple[bytes | float, ...]" is not assignable to type "tuple[bytes, ...] | tuple[memoryview[int], ...] | tuple[str, ...] | tuple[int, ...] | tuple[float, ...]"
+ Type "tuple[bytes | memoryview[int], ...]" is not assignable to type "tuple[bytes, ...] | tuple[memoryview[int], ...] | tuple[str, ...] | tuple[int, ...] | tuple[float, ...]"
+ "tuple[bytes | memoryview[int], ...]" is not assignable to "tuple[bytes, ...]"
+ Tuple entry 1 is incorrect type
+ Type "bytes | memoryview[int]" is not assignable to type "bytes"
+ "tuple[bytes | memoryview[int], ...]" is not assignable to "tuple[memoryview[int], ...]"
+ Tuple entry 1 is incorrect type
+ Type "bytes | memoryview[int]" is not assignable to type "memoryview[int]"
+ ... (reportAssignmentType)
+ .../projects/aioredis/aioredis/connection.py:934:20 - error: Type "tuple[bytes, ...] | tuple[bytes | memoryview[int], ...] | tuple[bytes | str, ...] | tuple[bytes | int, ...] | tuple[bytes | float, ...]" is not assignable to declared type "tuple[bytes, ...] | tuple[memoryview[int], ...] | tuple[str, ...] | tuple[int, ...] | tuple[float, ...]"
+ Type "tuple[bytes, ...] | tuple[bytes | memoryview[int], ...] | tuple[bytes | str, ...] | tuple[bytes | int, ...] | tuple[bytes | float, ...]" is not assignable to type "tuple[bytes, ...] | tuple[memoryview[int], ...] | tuple[str, ...] | tuple[int, ...] | tuple[float, ...]"
+ Type "tuple[bytes | memoryview[int], ...]" is not assignable to type "tuple[bytes, ...] | tuple[memoryview[int], ...] | tuple[str, ...] | tuple[int, ...] | tuple[float, ...]"
+ "tuple[bytes | memoryview[int], ...]" is not assignable to "tuple[bytes, ...]"
+ Tuple entry 1 is incorrect type
+ Type "bytes | memoryview[int]" is not assignable to type "bytes"
+ "tuple[bytes | memoryview[int], ...]" is not assignable to "tuple[memoryview[int], ...]"
+ Tuple entry 1 is incorrect type
+ Type "bytes | memoryview[int]" is not assignable to type "memoryview[int]"
+ ... (reportAssignmentType)
- 333 errors, 2678 warnings, 0 notes
+ 335 errors, 2678 warnings, 0 notes
beartype (https://github.com/beartype/beartype)
- .../projects/beartype/beartype/door/_cls/doorsuper.py:355:9 - warning: Return type is unknown (reportUnknownParameterType)
+ .../projects/beartype/beartype/door/_cls/doorsuper.py:355:9 - warning: Return type, "TypeHint[Unknown] | tuple[TypeHint[Unknown], ...]", is partially unknown (reportUnknownParameterType)
- .../projects/beartype/beartype/door/_cls/doorsuper.py:355:27 - warning: Type of parameter "index" is unknown (reportUnknownParameterType)
- .../projects/beartype/beartype/door/_cls/doorsuper.py:396:16 - warning: Return type is unknown (reportUnknownVariableType)
+ .../projects/beartype/beartype/door/_cls/doorsuper.py:396:16 - warning: Return type, "TypeHint[Unknown] | tuple[TypeHint[Unknown], ...]", is partially unknown (reportUnknownVariableType)
- 752 errors, 4897 warnings, 0 notes
+ 752 errors, 4896 warnings, 0 notes
scrapy (https://github.com/scrapy/scrapy)
- Type of "setdefault" is "Overload[(self: MutableMapping[Unknown, Unknown | None], key: Unknown, default: None = None, /) -> (Unknown | None), (self: dict[Unknown, Unknown], key: Unknown, default: Unknown, /) -> Unknown]" (reportUnknownMemberType)
+ Type of "setdefault" is "Overload[(self: MutableMapping[Unknown, Unknown | None], key: Unknown, default: None = None, /) -> (Unknown | None), (self: MutableMapping[Unknown, Unknown | None], key: Unknown, default: Unknown, /) -> Unknown]" (reportUnknownMemberType)
- .../projects/scrapy/tests/test_pipeline_files.py:549:71 - warning: Type of parameter "item" is Any (reportAny)
- .../projects/scrapy/tests/test_pipeline_media.py:30:51 - warning: Type of parameter "item" is Any (reportAny)
- .../projects/scrapy/tests/test_pipeline_media.py:36:60 - warning: Type of parameter "item" is Any (reportAny)
- .../projects/scrapy/tests/test_pipeline_media.py:42:63 - warning: Type of parameter "item" is Any (reportAny)
- 2550 errors, 22194 warnings, 0 notes
+ 2550 errors, 22190 warnings, 0 notes
rclip (https://github.com/yurijmikhalevich/rclip)
+ .../projects/rclip/rclip/utils/helpers.py:234:27 - error: Argument of type "str" cannot be assigned to parameter "self" of type "LiteralString" in function "removeprefix"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
- 10 errors, 12 warnings, 0 notes
+ 11 errors, 12 warnings, 0 notes
ibis (https://github.com/ibis-project/ibis)
+ .../projects/ibis/ibis/backends/pyspark/tests/conftest.py:284:37 - error: Argument of type "list[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "list[str]" is not assignable to "Iterable[LiteralString]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
+ .../projects/ibis/ibis/backends/pyspark/tests/conftest.py:284:37 - error: Argument of type "list[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "list[str]" is not assignable to "Iterable[_T1@__new__]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "_T1@__new__"
+ Type "str" is not assignable to type "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
- .../projects/ibis/ibis/backends/sql/compilers/clickhouse.py:24:48 - warning: Type of parameter "where" is Any (reportAny)
- .../projects/ibis/ibis/backends/sql/compilers/flink.py:23:48 - warning: Type of parameter "where" is Any (reportAny)
+ .../projects/ibis/ibis/backends/tests/base.py:77:17 - error: Argument of type "list[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "list[str]" is not assignable to "Iterable[LiteralString]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
+ .../projects/ibis/ibis/backends/tests/base.py:77:17 - error: Argument of type "list[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "list[str]" is not assignable to "Iterable[_T1@__new__]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "_T1@__new__"
+ Type "str" is not assignable to type "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
- .../projects/ibis/ibis/common/deferred.py:586:5 - error: Overloaded implementation is not consistent with signature of overload 1
- Function return type "(F@deferrable) -> F@deferrable" is incompatible with type "((func: Unknown) -> _Wrapped[..., Unknown, ..., Deferred | Unknown]) | _Wrapped[..., Unknown, ..., Deferred | Unknown]"
- Type "(F@deferrable) -> F@deferrable" is not assignable to type "((func: Unknown) -> _Wrapped[..., Unknown, ..., Deferred | Unknown]) | _Wrapped[..., Unknown, ..., Deferred | Unknown]"
- Type "(F@deferrable) -> F@deferrable" is not assignable to type "(func: Unknown) -> _Wrapped[..., Unknown, ..., Deferred | Unknown]"
- Missing keyword parameter "func"
- Position-only parameter mismatch; parameter "func" is not position-only
- Position-only parameter mismatch; expected 1 but received 0
- Function return type "F@deferrable" is incompatible with type "_Wrapped[..., Unknown, ..., Deferred | Unknown]"
- "FunctionType" is not assignable to "_Wrapped[..., Unknown, ..., Deferred | Unknown]" (reportInconsistentOverload)
- .../projects/ibis/ibis/common/deferred.py:586:16 - warning: Type of parameter "func" is partially unknown
- Parameter type is "Unknown | None" (reportUnknownParameterType)
- .../projects/ibis/ibis/common/deferred.py:623:49 - warning: Argument type is unknown
- Argument corresponds to parameter "func" in function "wrapper" (reportUnknownArgumentType)
+ .../projects/ibis/ibis/examples/gen_registry.py:45:39 - error: Argument of type "list[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "list[str]" is not assignable to "Iterable[LiteralString]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
+ .../projects/ibis/ibis/examples/gen_registry.py:45:39 - error: Argument of type "list[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "list[str]" is not assignable to "Iterable[_T1@__new__]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "_T1@__new__"
+ Type "str" is not assignable to type "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
+ .../projects/ibis/ibis/examples/gen_registry.py:364:38 - error: Argument of type "KeysView[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "KeysView[str]" is not assignable to "Iterable[LiteralString]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
+ .../projects/ibis/ibis/examples/gen_registry.py:364:38 - error: Argument of type "KeysView[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "KeysView[str]" is not assignable to "Iterable[_T1@__new__]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "_T1@__new__"
+ Type "str" is not assignable to type "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
- Argument type is "(value_or_year: Unknown, month: Unknown | None = None, day: Unknown | None = None, hour: Unknown | None = None, minute: Unknown | None = None, second: Unknown | None = None, /, timezone: Unknown | None = None) -> (Any | Unknown | Scalar)" (reportUnknownArgumentType)
+ Argument type is "(value_or_year: int | IntegerValue | Deferred | Any, month: int | IntegerValue | Deferred | Unknown | None = None, day: int | IntegerValue | Deferred | str | None = None, hour: int | IntegerValue | Deferred | None = None, minute: int | IntegerValue | Deferred | None = None, second: int | IntegerValue | Deferred | None = None, /, timezone: str | None = None) -> TimestampValue" (reportUnknownArgumentType)
- Type "(value_or_year: Unknown, month: Unknown | None = None, day: Unknown | None = None, hour: Unknown | None = None, minute: Unknown | None = None, second: Unknown | None = None, /, timezone: Unknown | None = None) -> (Any | Unknown | Scalar)" is not assignable to type "(value_or_year: Any, /, timezone: str | None = None) -> TimestampValue"
+ Type "(value_or_year: int | IntegerValue | Deferred | Any, month: int | IntegerValue | Deferred | Unknown | None = None, day: int | IntegerValue | Deferred | str | None = None, hour: int | IntegerValue | Deferred | None = None, minute: int | IntegerValue | Deferred | None = None, second: int | IntegerValue | Deferred | None = None, /, timezone: str | None = None) -> TimestampValue" is not assignable to type "(value_or_year: Any, /, timezone: str | None = None) -> TimestampValue"
- .../projects/ibis/ibis/expr/api.py:819:5 - warning: Type of parameter "value_or_year" is unknown (reportUnknownParameterType)
- Parameter type is "Unknown | None" (reportUnknownParameterType)
+ Parameter type is "int | IntegerValue | Deferred | Unknown | None" (reportUnknownParameterType)
- .../projects/ibis/ibis/expr/api.py:821:5 - warning: Type of parameter "day" is partially unknown
- Parameter type is "Unknown | None" (reportUnknownParameterType)
- .../projects/ibis/ibis/expr/api.py:822:5 - warning: Type of parameter "hour" is partially unknown
- Parameter type is "Unknown | None" (reportUnknownParameterType)
- .../projects/ibis/ibis/expr/api.py:823:5 - warning: Type of parameter "minute" is partially unknown
- Parameter type is "Unknown | None" (reportUnknownParameterType)
- .../projects/ibis/ibis/expr/api.py:824:5 - warning: Type of parameter "second" is partially unknown
- Parameter type is "Unknown | None" (reportUnknownParameterType)
- .../projects/ibis/ibis/expr/api.py:826:5 - warning: Type of parameter "timezone" is partially unknown
- Parameter type is "Unknown | None" (reportUnknownParameterType)
- Type of "args" is "tuple[Unknown, Unknown | None, Unknown | None, Unknown | None, Unknown | None, Unknown | None]" (reportUnknownVariableType)
+ Type of "args" is "tuple[int | IntegerValue | Deferred | Any, int | IntegerValue | Deferred | Unknown | None, int | IntegerValue | Deferred | str | None, int | IntegerValue | Deferred | None, int | IntegerValue | Deferred | None, int | IntegerValue | Deferred | None]" (reportUnknownVariableType)
- Type of "a" is "Unknown | None" (reportUnknownVariableType)
+ Type of "a" is "int | IntegerValue | Deferred | Unknown | str | None" (reportUnknownVariableType)
- .../projects/ibis/ibis/expr/api.py:894:16 - warning: Argument type is unknown
- Argument corresponds to parameter "year" in function "__init__" (reportUnknownArgumentType)
- .../projects/ibis/ibis/expr/api.py:894:16 - error: Argument of type "Unknown | None" cannot be assigned to parameter "month" of type "Value[Integer, Any]" in function "__init__"
+ .../projects/ibis/ibis/expr/api.py:894:16 - error: Argument of type "int | IntegerValue | Deferred | Any" cannot be assigned to parameter "year" of type "Value[Integer, Any]" in function "__init__"
- Type "Unknown | None" is not assignable to type "Value[Integer, Any]"
+ Type "int | IntegerValue | Deferred | Any" is not assignable to type "Value[Integer, Any]"
- "None" is not assignable to "Value[Integer, Any]" (reportArgumentType)
+ "IntegerValue" is not assignable to "Value[Integer, Any]" (reportArgumentType)
- .../projects/ibis/ibis/expr/api.py:894:16 - error: Argument of type "Unknown | None" cannot be assigned to parameter "day" of type "Value[Integer, Any]" in function "__init__"
... (truncated 225 lines) ...
Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ .../projects/Tanjun/tanjun/_internal/__init__.py:685:43 - error: Argument of type "filter[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "filter[str]" is incompatible with protocol "Iterable[LiteralString]"
+ "__iter__" is an incompatible type
+ Type "() -> filter[str]" is not assignable to type "() -> Iterator[_T_co@Iterable]"
+ Function return type "filter[str]" is incompatible with type "Iterator[_T_co@Iterable]"
+ "filter[str]" is incompatible with protocol "Iterator[_T_co@Iterable]" (reportArgumentType)
+ .../projects/Tanjun/tanjun/_internal/__init__.py:685:43 - error: Argument of type "filter[str]" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+ "filter[str]" is incompatible with protocol "Iterable[_T1@__new__]"
+ Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "_T1@__new__"
+ Type "str" is not assignable to type "LiteralString"
+ "str" is not assignable to "LiteralString" (reportArgumentType)
+ .../projects/Tanjun/tanjun/abc.py
+ .../projects/Tanjun/tanjun/abc.py:2119:23 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/abc.py:2199:30 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/abc.py:2263:29 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/abc.py:2327:28 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/abc.py:2391:25 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/commands/menu.py:419:9 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/hooks.py
+ .../projects/Tanjun/tanjun/hooks.py:111:24 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/hooks.py:193:23 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/hooks.py:239:30 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/hooks.py:282:29 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/hooks.py:325:28 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
+ .../projects/Tanjun/tanjun/hooks.py:368:25 - error: Type annotation is missing for parameter "self" (reportMissingParameterType)
- 37 errors, 100 warnings, 0 notes
+ 51 errors, 100 warnings, 0 notes
sympy (https://github.com/sympy/sympy)
+ .../projects/sympy/sympy/core/numbers.py:455:9 - error: Method "__add__" overrides class "Expr" in an incompatible manner
+ No overload signature in override is compatible with base method (reportIncompatibleMethodOverride)
+ .../projects/sympy/sympy/core/numbers.py:463:41 - error: Argument of type "Number | int | float | Expr" cannot be assigned to parameter of type "complex"
+ Type "Number | int | float | Expr" is not assignable to type "complex"
+ "Expr" is not assignable to "complex" (reportArgumentType)
- .../projects/sympy/sympy/core/singleton.py:151:24 - warning: Type of parameter "a" is unknown (reportUnknownParameterType)
- Argument types: (Unknown, Unknown | None, bool, bool, bool, Unknown | None) (reportCallIssue)
+ Argument types: (int | float | Expr | complex | Tbasic@__call__ | Any, Unknown | None, bool, bool, bool, Unknown | None) (reportCallIssue)
- .../projects/sympy/sympy/core/sympify.py:124:13 - warning: Type of parameter "a" is unknown (reportUnknownParameterType)
- .../projects/sympy/sympy/core/sympify.py:400:24 - warning: Argument type is unknown
- Argument corresponds to parameter "o" in function "getattr" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:402:16 - warning: Return type is unknown (reportUnknownVariableType)
- .../projects/sympy/sympy/core/sympify.py:405:20 - warning: Return type is unknown (reportUnknownVariableType)
- .../projects/sympy/sympy/core/sympify.py:407:32 - warning: Argument type is unknown
- Argument corresponds to parameter "expr" in function "__init__" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:412:19 - warning: Argument type is unknown
- Argument corresponds to parameter "o" in function "getattr" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:426:32 - warning: Argument type is unknown
- Argument corresponds to parameter "expr" in function "__init__" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:428:20 - warning: Return type is unknown (reportUnknownVariableType)
- .../projects/sympy/sympy/core/sympify.py:434:27 - warning: Argument type is unknown
- Argument corresponds to parameter "a" in function "_is_numpy_instance" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:437:41 - warning: Argument type is unknown
- Argument corresponds to parameter "a" in function "_convert_numpy_types" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:441:23 - warning: Argument type is unknown
- Argument corresponds to parameter "o" in function "getattr" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:443:16 - warning: Type of "_sympy_" is unknown (reportUnknownMemberType)
+ .../projects/sympy/sympy/core/sympify.py:443:16 - warning: Type of "_sympy_" is partially unknown
+ Type of "_sympy_" is "Unknown | Any" (reportUnknownMemberType)
- .../projects/sympy/sympy/core/sympify.py:443:16 - warning: Return type is unknown (reportUnknownVariableType)
+ .../projects/sympy/sympy/core/sympify.py:443:16 - warning: Return type, "Unknown | Any", is partially unknown (reportUnknownVariableType)
- .../projects/sympy/sympy/core/sympify.py:448:24 - warning: Argument type is unknown
- Argument corresponds to parameter "o" in function "getattr" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:450:29 - warning: Argument type is unknown
- Argument corresponds to parameter "o" in function "getattr" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:453:30 - warning: Type of "flat" is unknown (reportUnknownMemberType)
+ .../projects/sympy/sympy/core/sympify.py:443:18 - error: Cannot access attribute "_sympy_" for class "int"
+ Attribute "_sympy_" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:443:18 - error: Cannot access attribute "_sympy_" for class "float"
+ Attribute "_sympy_" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:443:18 - error: Cannot access attribute "_sympy_" for class "Expr"
+ Attribute "_sympy_" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:443:18 - error: Cannot access attribute "_sympy_" for class "complex"
+ Attribute "_sympy_" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:443:18 - error: Cannot access attribute "_sympy_" for class "Basic*"
+ Attribute "_sympy_" is unknown (reportAttributeAccessIssue)
- .../projects/sympy/sympy/core/sympify.py:453:30 - warning: Argument type is unknown
+ .../projects/sympy/sympy/core/sympify.py:453:30 - warning: Type of "flat" is partially unknown
- Argument corresponds to parameter "iterable" in function "__new__" (reportUnknownArgumentType)
+ Type of "flat" is "Unknown | Any" (reportUnknownMemberType)
+ .../projects/sympy/sympy/core/sympify.py:453:32 - error: Cannot access attribute "flat" for class "int"
+ Attribute "flat" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:453:32 - error: Cannot access attribute "flat" for class "float"
+ Attribute "flat" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:453:32 - error: Cannot access attribute "flat" for class "Expr"
+ Attribute "flat" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:453:32 - error: Cannot access attribute "flat" for class "complex"
+ Attribute "flat" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:453:32 - error: Cannot access attribute "flat" for class "Basic*"
+ Attribute "flat" is unknown (reportAttributeAccessIssue)
- .../projects/sympy/sympy/core/sympify.py:453:38 - warning: Type of "shape" is unknown (reportUnknownMemberType)
+ .../projects/sympy/sympy/core/sympify.py:453:38 - warning: Type of "shape" is partially unknown
- .../projects/sympy/sympy/core/sympify.py:453:38 - warning: Argument type is unknown
- Argument corresponds to parameter "shape" in function "__new__" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:456:31 - warning: Argument type is unknown
- Argument corresponds to parameter "a" in function "_is_numpy_instance" (reportUnknownArgumentType)
+ .../projects/sympy/sympy/core/sympify.py:453:40 - error: Cannot access attribute "shape" for class "int"
+ .../projects/sympy/sympy/core/sympify.py:453:40 - error: Cannot access attribute "shape" for class "float"
+ .../projects/sympy/sympy/core/sympify.py:453:40 - error: Cannot access attribute "shape" for class "Expr"
+ .../projects/sympy/sympy/core/sympify.py:453:40 - error: Cannot access attribute "shape" for class "complex"
+ .../projects/sympy/sympy/core/sympify.py:453:40 - error: Cannot access attribute "shape" for class "Basic*"
- .../projects/sympy/sympy/core/sympify.py:462:20 - warning: Type of "ndim" is unknown (reportUnknownMemberType)
+ .../projects/sympy/sympy/core/sympify.py:462:20 - warning: Type of "ndim" is partially unknown
+ Type of "ndim" is "Unknown | Any" (reportUnknownMemberType)
+ .../projects/sympy/sympy/core/sympify.py:462:22 - error: Cannot access attribute "ndim" for class "int"
+ Attribute "ndim" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:462:22 - error: Cannot access attribute "ndim" for class "float"
+ Attribute "ndim" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:462:22 - error: Cannot access attribute "ndim" for class "Expr"
+ Attribute "ndim" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:462:22 - error: Cannot access attribute "ndim" for class "complex"
+ Attribute "ndim" is unknown (reportAttributeAccessIssue)
+ .../projects/sympy/sympy/core/sympify.py:462:22 - error: Cannot access attribute "ndim" for class "Basic*"
+ Attribute "ndim" is unknown (reportAttributeAccessIssue)
- Argument types: (Unknown, Unknown | None, bool, bool, bool, Any | Unknown) (reportCallIssue)
+ Argument types: (Unknown | Any, Unknown | None, bool, bool, bool, Any | Unknown) (reportCallIssue)
- .../projects/sympy/sympy/core/sympify.py:464:40 - warning: Type of "item" is unknown (reportUnknownMemberType)
- .../projects/sympy/sympy/core/sympify.py:472:22 - warning: Argument type is unknown
- Argument corresponds to parameter "obj" in function "hasattr" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:475:34 - warning: Argument type is unknown
- Argument corresponds to parameter "x" in function "__new__" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:476:22 - warning: Argument type is unknown
- Argument corresponds to parameter "obj" in function "hasattr" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:477:32 - warning: Argument type is unknown
- Argument corresponds to parameter "x" in function "__new__" (reportUnknownArgumentType)
- .../projects/sympy/sympy/core/sympify.py:480:28 - warning: Argument type is partially unknown
- Argument corresponds to parameter "expr" in function "__init__"
- Argument type is "Unknown | str" (reportUnknownArgumentType)
... (truncated 1713 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.
fises: #179
TODO
don't infer the return type from overloads, ensure it is consistent with overloads instead #1527