| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I'm always in favor of bringing our stubs more in line with reality, so in general I'm in favor of the change. But unfortunately at least mypy seems heavily dependent on the current typing – as shown by the mypy primer output. We'd need to ensure that current type checkers will work with the updated stubs, before making this change. Maybe it's also worth trying both changes (to typing and _collections_abc) in isolation to see if both break the world, or if you could at least do half of this PR. |
Sorry, something went wrong.
this is a circular dependency. how can we ever change anything if the change needs to be compatible with our dependants i will try them in isolation, i feel that the class with generics isn't going to be so well consumed, although i would be interested in pulling in the maintainers of other type checkers to see if they are welcomming to the change (fyi, i maintain pycharm) |
Sorry, something went wrong.
In that case this needs coordination with the dependents, but we won't change this unilaterally. Just changing typing.Callable looks more promising, indeed, but pyright would obviously needs to be changed as well (although I suspect the change is rather simple). |
Sorry, something went wrong.
That's why I said in astral-sh/ty#1215 (comment):
It's not impossible to make a change like this but, as @srittau says, it is nontrivial. You'll first need to get consensus among all the major type checkers that the change is worth making (or at the very least, make sure that they're aware the change is coming, and make sure that they're willing to adapt to the change). Ideally we'd have PRs "ready to go" in the type checkers that need changes before the typeshed change is merged. |
Sorry, something went wrong.
|
so, any advice on resolving these failing tests? should we summon the maintainer of pyright? (or basedpyright?) |
Sorry, something went wrong.
|
Yes, @erictraut might be able to help. |
Sorry, something went wrong.
|
This is a pretty disruptive change. Is there a specific problem that it solves? I'm not against making improvements if there's a real benefit to users or type checker authors, but it's not clear to me what those benefits are in this case. As @AlexWaygood mentioned, if we want to model types.Callable as an _Alias, then I think there needs to be some other symbol that it aliases. It can't alias itself. Presumably, it aliases collections.abc.Callable. But then how is collections.abc.Callable defined? If it's not defined as a _SpecialForm, then presumably it would be defined as a normal class definition? Defining it in that way will require some hard-coded logic in type checkers because Callable does not follow the normal rules for a normal class. |
Sorry, something went wrong.
primarily that Callable is actually a type, and has a __call__ attribute, and the flow-on consequences of that from collections.abc import Callable
def f(t: type[object]): ...
f(Callable)
class C(Callable): ...
a: Callable
a.__call__
what exactly are the different rules to a normal class? i'm not aware of any, i would expect: class Callable[**Parameters, Return](Protocol): # not actually a protocol, but acts like one, same as everything else in collections.abc
@abstractmethod
def __call__(self, *args: Parameters.args, **kwargs: Parameters.kwargs) -> Return: ...how much effort would be involved in un-special casing Callable and just using this new defintion? i'd imagine there would need to be some logic to connect the alias to the definition, but the rest would just be removing of special-casing? so i see two options:
|
Sorry, something went wrong.
|
I'm still trying to understand if the proposed change is solving an actual problem that users are hitting or if this falls more under the category of "it would be nice if this were more aligned with the runtime"? If it's the latter, then I think we need to consider the impact and cost of the change and weigh it against the benefits.
I can't speak for other type checkers, but for pyright it's not as simple as "un-special casing". Callable does not act like normal classes in a number of respects, so special-casing is still required. Notably, when used as a type form, it accepts a list expression for its first type argument. It also accepts ... (which has a special meaning) and the Concatenate special form. I'd need to investigate further to enumerate all of the special casing. |
Sorry, something went wrong.
i have run into these issues when trying to write code additionally, it is very confusing to see that the definition of Callable is Callable: _SpecialForm
i don't think there is anything special about these semantics at all: Code sample in basedpyright playground from collections.abc import Callable
from typing import Concatenate
class CustomCa[**P, R]: ...
_ = Callable[..., int]
_ = CustomCa[..., int]
def f[**P](
a: Callable[[Concatenate[int, P]], None],
b: CustomCa[[Concatenate[int, P]], None],
): ...the only special casing that i am aware of is the assumption that Callable has a definition of __get__ that is the same as FunctionType.__get__ |
Sorry, something went wrong.
|
@rchen152 @DetachHead @carljm @stroxler @KotlinIsland hi all, i'm looking for feedback on this change regarding fixing the definition of Callable i'm not sure who the maintainer of pyright is |
Sorry, something went wrong.
|
I think ty could fairly easily adapt to any change here without changing our behavior, since currently our treatment of Callable is entirely special-cased; we'd just need a small adjustment to make sure we recognize the new definition. But for that same reason, any change here wouldn't automatically grant ty any new understanding of the runtime behavior of Callable; we'd have to manually implement all such understanding. I think it is true that since the introduction of ParamSpec, much of the core of what used to need special-casing for Callable is no longer as special as it used to be. But I suspect replacing Callable with a runtime-checkable callable protocol type would still be difficult in practice, because there is still special handling that type checkers apply to Callable that they don't apply to a callable protocol, e.g. implicitly assuming function-like __get__ in some scenarios, and some type checkers also assume function attributes like __name__. Mostly I think this still needs stronger motivation, since I've never heard this request before. What kinds of code specifically has trouble here? Are those needs best served by PEP 747 (TypeForm)? |
Sorry, something went wrong.
|
Stubs for core constructs like Callable are always a bit special and it's hard to argue what's objectively the best way to represent them. The PR description has some examples of code that should work but currently doesn't, which is good. However, does this PR actually fix those cases in any type checker? If so, it would be good to add test cases for them so we can be sure to preserve those behaviors. It might also be that these issues are better fixed in individual type checkers. |
Sorry, something went wrong.
i would presume not, until the checkers are updated to accommodate the change |
Sorry, something went wrong.
it's more the opposite, when using Callable as a type |
Sorry, something went wrong.
It's not really clear to me why you'd expect this change to help. |
Sorry, something went wrong.
|
ty already supports synthesizing an accurate __call__ attribute on all callable types; I suspect this should not be too hard for any type checker. It looks like pyright and pyrefly currently give it a permissive gradual type, while mypy/zuban consider it not to exist. I'm still not clear on the practical utility of assigning the object typing.Callable to type[object], but that seems similarly easy to implement; it certainly wouldn't be hard for ty. Similar for supporting inheriting Callable. Unless the runtime implementation were changed to be an actual Protocol, I think this is likely best handled via special casing in type checkers. On the whole it seems to me that updating typeshed is more likely a distraction / additional churn than it is a useful step towards specifying and implementing the specific desired behaviors in type checkers. |
Sorry, something went wrong.
if we take this change, then the amount of special casing around Callable would be reduced, currently a type checker needs to special case Callable to understand that it is actually a class, and not an instance of _SpecialForm if we make it an actual class (and the type checkers adjust their special casing to accommodate), then the examples in the OP would be resolved so if we want the fixes, we have two choices: implement a lot more special casing than we already have, or reduce and adjust the existing special casing to suite this change |
Sorry, something went wrong.
This is certainly not true for the current change in this PR. In theory it could maybe be true if we defined Callable as a runtime-checkable callable protocol generic over a paramspec, but I don't think we should do that in typeshed unless we also do it in runtime typing.py, and this becomes an extremely disruptive change that still doesn't fully eliminate the need for special-casing, and practically offers limited benefits. Any change short of that (e.g. representing Callable in typeshed as a class more similar to the runtime class) would likely not reduce special-casing in ty at all; it would be more complicated to try to partially special-case and partially pass-through to the typeshed definition than it would be to continue fully special-casing. I think if your goal is to achieve certain behaviors in type checkers, by far the most likely way to achieve that is by implementing the desired behavior in each type checker. |
Sorry, something went wrong.
in runtime typing.py it is an _Alias to collections.abc.Callable. i don't think i understand the issue you are describing |
Sorry, something went wrong.
A _SpecialGenericAlias, yes.
I'm not describing an issue, I'm stating an opinion that typeshed should not claim that either typing.Callable or collections.abc.Callable is a protocol class unless that's what it is at runtime, and currently it is not. (And it would be likely quite disruptive to make it one at runtime.) |
Sorry, something went wrong.
currently all the ABCs in collections.abc (sans Callable) are declared as runtime_checkable Protocols. while this is not technically accurate, it does a good job of describing their runtime behaviour. all of these types have corresponding aliases in typing. i am suggesting that we change the definition of Callable to match the rest of these definitions. this change would make the definitions of Callable more accurate and more consistent with the rest of typing and collections.abc |
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: packaging (https://github.com/pypa/packaging)
+ src/packaging/_musllinux.py:67: error: Need type annotation for "sys_musl" [var-annotated]
+ src/packaging/_manylinux.py:183: error: Need type annotation for "sys_glibc" [var-annotated]
+ src/packaging/metadata.py:648: error: Need type annotation for "dynamic_field" [var-annotated]
manticore (https://github.com/trailofbits/manticore)
+ tests/auto_generators/make_dump.py:228: error: Need type annotation for "groups" [var-annotated]
+ manticore/utils/log.py:43: error: Need type annotation for "colors" [var-annotated]
+ manticore/platforms/linux_syscall_stubs.py:1177: error: Need type annotation for "x" [var-annotated]
+ manticore/utils/helpers.py:40: error: Need type annotation for "c" [var-annotated]
+ manticore/core/smtlib/solver.py:297: error: Need type annotation for "lparen" [var-annotated]
+ manticore/core/smtlib/solver.py:297: error: Need type annotation for "rparen" [var-annotated]
+ manticore/native/cpu/abstractcpu.py:366: error: Need type annotation for "argument_iter" [var-annotated]
+ manticore/platforms/linux.py:3731: error: Need type annotation for "obj" [var-annotated]
pandera (https://github.com/pandera-dev/pandera)
+ pandera/utils.py:9: error: Type variable "pandera.utils.F" is unbound [valid-type]
+ pandera/utils.py:9: note: (Hint: Use "Generic[F]" or "Protocol[F]" base class to bind "F" inside a class)
+ pandera/utils.py:9: note: (Hint: Use "F" in function signature to bind "F" inside a function)
+ pandera/inspection_utils.py:27: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
+ pandera/api/base/checks.py:96: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
+ pandera/api/base/checks.py:97: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
+ pandera/api/base/checks.py:100: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
- pandera/backends/pandas/checks.py:309: error: Cannot infer type of lambda [misc]
+ pandera/api/extensions.py:256: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
+ pandera/api/extensions.py:258: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
+ pandera/api/extensions.py:317: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
- pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
+ pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | _collections_abc.Callable[[Series[Any]], Series[builtins.bool]] | _collections_abc.Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
- pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
+ pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | _collections_abc.Callable[[Series[Any]], Series[builtins.bool]] | _collections_abc.Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
- pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
+ pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | _collections_abc.Callable[[Series[Any]], Series[builtins.bool]] | _collections_abc.Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
- pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
+ pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | _collections_abc.Callable[[Series[Any]], Series[builtins.bool]] | _collections_abc.Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
- pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
+ pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | _collections_abc.Callable[[Series[Any]], Series[builtins.bool]] | _collections_abc.Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
- pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
+ pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | _collections_abc.Callable[[Series[Any]], Series[builtins.bool]] | _collections_abc.Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
- pandera/api/dataframe/model.py:246: error: Redundant cast to "DataFrameBase[Self]" [redundant-cast]
+ pandera/api/dataframe/model.py:243: error: Unsupported decorated constructor type [misc]
+ pandera/api/dataframe/model.py:246: error: F? not callable [misc]
+ pandera/api/dataframe/model.py:444: error: "type" has no attribute "Config" [attr-defined]
+ pandera/decorators.py:137: error: "_collections_abc.Callable[Any, Any]" has no attribute "__name__" [attr-defined]
+ pandera/decorators.py:161: error: Type variable "pandera.decorators.F" is unbound [valid-type]
+ pandera/decorators.py:161: note: (Hint: Use "Generic[F]" or "Protocol[F]" base class to bind "F" inside a class)
+ pandera/decorators.py:161: note: (Hint: Use "F" in function signature to bind "F" inside a function)
+ pandera/decorators.py:301: error: Type variable "pandera.decorators.F" is unbound [valid-type]
+ pandera/decorators.py:301: note: (Hint: Use "Generic[F]" or "Protocol[F]" base class to bind "F" inside a class)
+ pandera/decorators.py:301: note: (Hint: Use "F" in function signature to bind "F" inside a function)
+ pandera/decorators.py:444: error: Type variable "pandera.decorators.F" is unbound [valid-type]
+ pandera/decorators.py:444: note: (Hint: Use "Generic[F]" or "Protocol[F]" base class to bind "F" inside a class)
+ pandera/decorators.py:444: note: (Hint: Use "F" in function signature to bind "F" inside a function)
+ pandera/decorators.py:548: error: Type variable "pandera.decorators.F" is unbound [valid-type]
+ pandera/decorators.py:548: note: (Hint: Use "Generic[F]" or "Protocol[F]" base class to bind "F" inside a class)
+ pandera/decorators.py:548: note: (Hint: Use "F" in function signature to bind "F" inside a function)
- tests/mypy/pandas_modules/pandas_dataframe.py:35: note: def [P`10458, T] pipe(self, func: Callable[[DataFrame[Schema], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/mypy/pandas_modules/pandas_dataframe.py:35: note: def [P`10231, T] pipe(self, func: _collections_abc.Callable[[DataFrame[Schema], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
- tests/mypy/pandas_modules/pandas_dataframe.py:35: note: def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/mypy/pandas_modules/pandas_dataframe.py:35: note: def [T] pipe(self, func: tuple[_collections_abc.Callable[[VarArg(Any), KwArg(Any)], T], str], *args: Any, **kwargs: Any) -> T
+ tests/strategies/test_strategies.py:994: error: Unused "type: ignore" comment [unused-ignore]
+ tests/pandas/test_decorators.py:124: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:128: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:132: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:135: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:139: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:146: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:150: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:169: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:175: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:181: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:192: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:268: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:324: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:327: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:331: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:337: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:340: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:343: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:445: error: Unused "type: ignore" comment [unused-ignore]
+ tests/pandas/test_decorators.py:458: error: Unused "type: ignore" comment [unused-ignore]
+ tests/pandas/test_decorators.py:469: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:492: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:524: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:833: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:1413: error: Unused "type: ignore" comment [unused-ignore]
+ tests/pandas/test_decorators.py:1413: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:1413: note: Error code "misc" not covered by "type: ignore" comment
+ tests/pandas/test_decorators.py:1414: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:1415: error: Unused "type: ignore" comment [unused-ignore]
+ tests/pandas/test_decorators.py:1415: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:1415: note: Error code "misc" not covered by "type: ignore" comment
+ tests/pandas/test_decorators.py:1801: error: F? not callable [misc]
+ tests/pandas/test_decorators.py:1805: error: F? not callable [misc]
- tests/dask/test_dask.py:31: error: "Series[Any]" not callable [operator]
- tests/dask/test_dask.py:31: note: Error code "operator" not covered by "type: ignore" comment
- tests/dask/test_dask.py:36: error: "Series[Any]" not callable [operator]
- tests/dask/test_dask.py:36: note: Error code "operator" not covered by "type: ignore" comment
- tests/dask/test_dask.py:41: error: "Series[Any]" not callable [operator]
- tests/dask/test_dask.py:41: note: Error code "operator" not covered by "type: ignore" comment
+ pandera/api/polars/model.py:140: error: F? not callable [misc]
spark (https://github.com/apache/spark)
+ python/pyspark/memory_profiler_ext.py:98: error: Need type annotation for "subcode" [var-annotated]
+ python/pyspark/memory_profiler_ext.py:117: error: Need type annotation for "subcode" [var-annotated]
+ python/pyspark/sql/types.py:2754: error: Cannot infer value of type parameter "_T" of "reduce" [misc]
+ python/pyspark/sql/pandas/types.py:792: error: Unused "type: ignore" comment [unused-ignore]
+ python/pyspark/sql/conversion.py:403: error: _T? not callable [misc]
+ python/pyspark/sql/conversion.py:1664: error: _T? not callable [misc]
+ python/pyspark/sql/pandas/conversion.py:109: error: _T? not callable [misc]
+ python/pyspark/sql/pandas/conversion.py:269: error: No overload variant of "concat" matches argument types "Sequence[Series[Any]]", "str" [call-overload]
+ python/pyspark/sql/pandas/conversion.py:269: note: Possible overload variants:
+ python/pyspark/sql/pandas/conversion.py:269: note: def [HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[None] | Mapping[HashableT1, None], *, axis: Literal['index', 0] | Literal['columns', 1] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> Never
+ python/pyspark/sql/pandas/conversion.py:269: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta, HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[Series[S2] | None] | Mapping[HashableT1, Series[S2] | None], *, axis: Literal['index', 0] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> Series[S2]
+ python/pyspark/sql/pandas/conversion.py:269: note: def [HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[Series[Any] | None] | Mapping[HashableT1, Series[Any] | None], *, axis: Literal['index', 0] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> Series[Any]
+ python/pyspark/sql/pandas/conversion.py:269: note: def [HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[NDFrame | None] | Mapping[HashableT1, NDFrame | None], *, axis: Literal['index', 0] | Literal['columns', 1] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> DataFrame
+ python/pyspark/sql/pandas/conversion.py:273: error: _T? not callable [misc]
+ python/pyspark/sql/pandas/conversion.py:426: error: No overload variant of "concat" matches argument types "list[Any]", "str" [call-overload]
+ python/pyspark/sql/pandas/conversion.py:426: note: Possible overload variants:
+ python/pyspark/sql/pandas/conversion.py:426: note: def [HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[None] | Mapping[HashableT1, None], *, axis: Literal['index', 0] | Literal['columns', 1] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> Never
+ python/pyspark/sql/pandas/conversion.py:426: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta, HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[Series[S2] | None] | Mapping[HashableT1, Series[S2] | None], *, axis: Literal['index', 0] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> Series[S2]
+ python/pyspark/sql/pandas/conversion.py:426: note: def [HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[Series[Any] | None] | Mapping[HashableT1, Series[Any] | None], *, axis: Literal['index', 0] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> Series[Any]
+ python/pyspark/sql/pandas/conversion.py:426: note: def [HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[NDFrame | None] | Mapping[HashableT1, NDFrame | None], *, axis: Literal['index', 0] | Literal['columns', 1] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ...) -> DataFrame
+ python/pyspark/sql/pandas/conversion.py:428: error: _T? not callable [misc]
+ python/pyspark/sql/classic/dataframe.py:745: error: Item "str" of "str | Any | list[str] | Column | list[Column]" has no attribute "_jc" [union-attr]
+ python/pyspark/sql/classic/dataframe.py:745: error: Item "list[str]" of "str | Any | list[str] | Column | list[Column]" has no attribute "_jc" [union-attr]
+ python/pyspark/sql/classic/dataframe.py:745: error: Item "list[Column]" of "str | Any | list[str] | Column | list[Column]" has no attribute "_jc" [union-attr]
+ python/pyspark/sql/classic/dataframe.py:874: error: Item "str" of "str | Any | list[str] | Column | list[Column]" has no attribute "_jc" [union-attr]
+ python/pyspark/sql/classic/dataframe.py:874: error: Item "list[str]" of "str | Any | list[str] | Column | list[Column]" has no attribute "_jc" [union-attr]
+ python/pyspark/sql/classic/dataframe.py:874: error: Item "list[Column]" of "str | Any | list[str] | Column | list[Column]" has no attribute "_jc" [union-attr]
+ python/pyspark/pandas/supported_api_gen.py:149: error: Need type annotation for "m" [var-annotated]
+ python/pyspark/pandas/supported_api_gen.py:208: error: Need type annotation for "m" [var-annotated]
+ python/pyspark/pandas/supported_api_gen.py:212: error: Need type annotation for "m" [var-annotated]
+ python/pyspark/ml/classification.py:3968: error: Unused "type: ignore" comment [unused-ignore]
freqtrade (https://github.com/freqtrade/freqtrade)
+ freqtrade/exchange/common.py:170: error: Type variable "freqtrade.exchange.common.F" is unbound [valid-type]
+ freqtrade/exchange/common.py:170: note: (Hint: Use "Generic[F]" or "Protocol[F]" base class to bind "F" inside a class)
+ freqtrade/exchange/common.py:170: note: (Hint: Use "F" in function signature to bind "F" inside a function)
- freqtrade/data/converter/converter.py:109: error: Argument 1 has incompatible type "dict[str, str]"; expected "Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str | list[Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str] | Mapping[Hashable, Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str | list[Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str]] | None" [arg-type]
+ freqtrade/data/converter/converter.py:109: error: Argument 1 has incompatible type "dict[str, str]"; expected "_collections_abc.Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | _collections_abc.Callable[[DataFrame], Series[Any]] | _collections_abc.Callable[[DataFrame], DataFrame] | ufunc | str | list[_collections_abc.Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | _collections_abc.Callable[[DataFrame], Series[Any]] | _collections_abc.Callable[[DataFrame], DataFrame] | ufunc | str] | Mapping[Hashable, _collections_abc.Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | _collections_abc.Callable[[DataFrame], Series[Any]] | _collections_abc.Callable[[DataFrame], DataFrame] | ufunc | str | list[_collections_abc.Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | _collections_abc.Callable[[DataFrame], Series[Any]] | _collections_abc.Callable[[DataFrame], DataFrame] | ufunc | str]] | None" [arg-type]
+ freqtrade/data/converter/converter.py:109: note: "dict" is missing following "Callable" protocol member:
+ freqtrade/data/converter/converter.py:109: note: __call__
+ freqtrade/data/converter/converter.py:109: note: "dict" is missing following "Callable" protocol member:
+ freqtrade/data/converter/converter.py:109: note: __call__
+ freqtrade/data/converter/converter.py:109: note: "dict" is missing following "Callable" protocol member:
+ freqtrade/data/converter/converter.py:109: note: __call__
+ freqtrade/exchange/exchange_ws.py:211: error: F? not callable [misc]
+ freqtrade/exchange/exchange.py:1713: error: F? not callable [misc]
+ freqtrade/exchange/exchange.py:1718: error: F? not callable [misc]
+ freqtrade/exchange/exchange.py:1741: error: F? not callable [misc]
+ freqtrade/exchange/exchange.py:1810: error: F? not callable [misc]
+ freqtrade/exchange/exchange.py:1952: error: F? not callable [misc]
+ freqtrade/exchange/exchange.py:1960: error: F? not callable [misc]
+ freqtrade/exchange/exchange.py:2654: error: F? not callable [misc]
+ freqtrade/exchange/okx.py:203: error: F? not callable [misc]
+ freqtrade/exchange/hyperliquid.py:355: error: F? not callable [misc]
+ freqtrade/exchange/bybit.py:266: error: F? not callable [misc]
+ freqtrade/rpc/rpc.py:1015: error: F? not callable [misc]
+ freqtrade/rpc/rpc.py:1220: error: F? not callable [misc]
- freqtrade/data/entryexitanalysis.py:58: error: Invalid index type "tuple[Hashable, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/data/entryexitanalysis.py:58: error: Invalid index type "tuple[Hashable, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | _collections_abc.Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/rpc/telegram.py:129: error: "_collections_abc.Callable[[VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]" has no attribute "__name__" [attr-defined]
- freqtrade/plot/plotting.py:187: error: Invalid index type "tuple[datetime, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/plot/plotting.py:187: error: Invalid index type "tuple[datetime, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | _collections_abc.Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
- freqtrade/plot/plotting.py:188: error: Invalid index type "tuple[datetime, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/plot/plotting.py:188: error: Invalid index type "tuple[datetime, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | _collections_abc.Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/freqtradebot.py:1412: error: F? not callable [misc]
+ freqtrade/freqtradebot.py:1586: error: F? not callable [misc]
+ freqtrade/freqtradebot.py:1740: error: F? not callable [misc]
+ freqtrade/freqtradebot.py:1791: error: F? not callable [misc]
+ freqtrade/freqtradebot.py:1889: error: F? not callable [misc]
+ freqtrade/worker.py:182: error: "_collections_abc.Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "__name__" [attr-defined]
- freqtrade/templates/FreqaiExampleStrategy.py:245: error: Invalid index type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], list[str]]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], Hashable]" [index]
- freqtrade/templates/FreqaiExampleStrategy.py:245: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:245: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
- freqtrade/templates/FreqaiExampleStrategy.py:255: error: Invalid index type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], list[str]]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], Hashable]" [index]
- freqtrade/templates/FreqaiExampleStrategy.py:255: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:255: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
- freqtrade/templates/FreqaiExampleStrategy.py:263: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:263: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
- freqtrade/templates/FreqaiExampleStrategy.py:267: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:267: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
+ freqtrade/plugins/protections/cooldown_period.py:43: error: Unused "type: ignore" comment [unused-ignore]
+ freqtrade/plugins/pairlist/PercentChangePairList.py:236: error: Unused "type: ignore" comment [unused-ignore]
mypy (https://github.com/python/mypy)
+ mypy/scope.py:122: error: Missing positional argument "prefix" in call to "__call__" of "Callable" [call-arg]
+ mypy/scope.py:122: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info
+ mypy/scope.py:122: error: Argument 1 to "__call__" of "Callable" has incompatible type "str"; expected "Scope" [arg-type]
+ mypy/scope.py:123: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/scope.py:123: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/scope.py:124: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/scope.py:124: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncBase"; expected "Scope" [arg-type]
+ mypy/server/aststrip.py:120: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/aststrip.py:120: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "NodeStripVisitor" [arg-type]
+ mypy/server/aststrip.py:142: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/aststrip.py:142: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "NodeStripVisitor" [arg-type]
+ mypy/server/aststrip.py:143: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/aststrip.py:152: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/aststrip.py:167: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:100: error: Missing positional argument "kind" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:100: error: Argument 1 to "__call__" of "Callable" has incompatible type "int"; expected "VariableRenameVisitor" [arg-type]
+ mypy/renaming.py:100: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:109: error: Missing positional argument "kind" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:109: error: Argument 1 to "__call__" of "Callable" has incompatible type "int"; expected "VariableRenameVisitor" [arg-type]
+ mypy/renaming.py:109: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:123: error: Missing positional argument "kind" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:123: error: Argument 1 to "__call__" of "Callable" has incompatible type "int"; expected "VariableRenameVisitor" [arg-type]
+ mypy/renaming.py:127: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:131: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:139: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:154: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:158: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:201: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:474: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:480: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/renaming.py:487: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/errors.py:519: error: Argument 1 to "defaultdict" has incompatible type "Callable[[], defaultdict[Never, list[Never]]]"; expected "_collections_abc.Callable[[], dict[int, list[str]]] | None" [arg-type]
+ mypy/modulefinder.py:40: error: Cannot infer value of type parameter "_T1" of "map" [misc]
+ mypy/modulefinder.py:42: error: Cannot infer value of type parameter "_T1" of "map" [misc]
+ mypy/modulefinder.py:44: error: Cannot infer value of type parameter "_T1" of "map" [misc]
+ mypy/modulefinder.py:46: error: Cannot infer value of type parameter "_T1" of "map" [misc]
+ mypy/solve.py:375: error: Returning Any from function declared to return "TypeVarLikeType | None" [no-any-return]
+ mypy/checkmember.py:288: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkmember.py:499: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/deps.py:202: error: Missing positional argument "prefix" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/deps.py:202: error: Argument 1 to "__call__" of "Callable" has incompatible type "str"; expected "Scope" [arg-type]
+ mypy/server/deps.py:213: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/deps.py:213: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/server/deps.py:249: error: Missing positional argument "prefix" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/deps.py:249: error: Argument 1 to "__call__" of "Callable" has incompatible type "str"; expected "Scope" [arg-type]
+ mypy/server/deps.py:257: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/deps.py:257: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncDef"; expected "Scope" [arg-type]
+ mypy/server/deps.py:305: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/deps.py:305: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/server/deps.py:319: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/deps.py:319: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/semanal_typeargs.py:67: error: Missing positional argument "prefix" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_typeargs.py:67: error: Argument 1 to "__call__" of "Callable" has incompatible type "str"; expected "Scope" [arg-type]
+ mypy/semanal_typeargs.py:73: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_typeargs.py:73: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncItem"; expected "Scope" [arg-type]
+ mypy/semanal_typeargs.py:77: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_typeargs.py:77: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/typeanal.py:1141: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/typeanal.py:1594: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/typeanal.py:2123: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/typeanal.py:2123: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/typeanal.py:2326: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/typeanal.py:2326: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/server/astdiff.py:490: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/server/astdiff.py:490: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/stats.py:146: error: Missing positional argument "o" in call to "__call__" of "Callable" [call-arg]
+ mypy/stats.py:146: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncDef"; expected "StatisticsVisitor" [arg-type]
+ mypy/semanal_typeddict.py:212: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_typeddict.py:212: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/plugins/attrs.py:329: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/plugins/attrs.py:329: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/plugins/dataclasses.py:167: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/plugins/dataclasses.py:167: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/plugins/dataclasses.py:203: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/plugins/dataclasses.py:203: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/plugins/dataclasses.py:706: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/plugins/dataclasses.py:706: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/semanal.py:699: error: Argument 1 to "__call__" of "Callable" has incompatible type "MypyFile"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:699: error: Argument 2 to "__call__" of "Callable" has incompatible type "Options"; expected "MypyFile" [arg-type]
+ mypy/semanal.py:699: error: Argument 3 to "__call__" of "Callable" has incompatible type "TypeInfo | None"; expected "Options" [arg-type]
+ mypy/semanal.py:919: error: Missing positional argument "prefix" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:919: error: Argument 1 to "__call__" of "Callable" has incompatible type "str"; expected "Scope" [arg-type]
+ mypy/semanal.py:986: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:986: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncDef"; expected "Scope" [arg-type]
+ mypy/semanal.py:986: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:987: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1022: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1022: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:1226: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1226: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:1281: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1281: error: Argument 1 to "__call__" of "Callable" has incompatible type "OverloadedFuncDef"; expected "Scope" [arg-type]
+ mypy/semanal.py:1281: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1304: error: Missing positional argument "item" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1304: error: Argument 1 to "__call__" of "Callable" has incompatible type "int"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:1442: error: Missing positional argument "item" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1442: error: Argument 1 to "__call__" of "Callable" has incompatible type "int | None"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:1661: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1661: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:1670: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1670: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:1680: error: Missing positional argument "function" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1680: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncItem"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:1812: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1837: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:1837: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:2042: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:2042: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/semanal.py:2155: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:2155: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/semanal.py:2159: error: Missing positional argument "named_tuple_info" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:2159: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "NamedTupleAnalyzer" [arg-type]
+ mypy/semanal.py:3306: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:3311: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:3326: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:3620: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:3620: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:3657: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:3657: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:4012: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:4012: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:4016: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:5494: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:5519: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:5557: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:5557: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:6041: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:6383: error: Missing positional argument "function" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:6383: error: Argument 1 to "__call__" of "Callable" has incompatible type "DictionaryComprehension"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:6390: error: Missing positional argument "function" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:6390: error: Argument 1 to "__call__" of "Callable" has incompatible type "GeneratorExpr"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:6421: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:6421: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:7718: error: Missing positional argument "frame" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:7718: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeVarLikeScope"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal.py:7718: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal.py:8091: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkexpr.py:3063: error: Missing positional argument "overrides" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkexpr.py:3063: error: Argument 1 to "__call__" of "Callable" has incompatible type "list[Expression]"; expected "ExpressionChecker" [arg-type]
+ mypy/checkexpr.py:3063: error: Argument 2 to "__call__" of "Callable" has incompatible type "list[Type]"; expected "Sequence[Expression]" [arg-type]
+ mypy/checkexpr.py:3081: error: Missing positional argument "overrides" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkexpr.py:3081: error: Argument 1 to "__call__" of "Callable" has incompatible type "list[Expression]"; expected "ExpressionChecker" [arg-type]
+ mypy/checkexpr.py:3081: error: Argument 2 to "__call__" of "Callable" has incompatible type "list[Type]"; expected "Sequence[Expression]" [arg-type]
+ mypy/checkexpr.py:3325: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkexpr.py:3938: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkexpr.py:5489: error: Missing positional argument "item" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkexpr.py:5489: error: Argument 1 to "__call__" of "Callable" has incompatible type "LambdaExpr"; expected "CheckerScope" [arg-type]
+ mypy/checkexpr.py:5506: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/checkexpr.py:5506: error: Argument 1 to "__call__" of "Callable" has incompatible type "LambdaExpr"; expected "Scope" [arg-type]
+ mypy/checker.py:526: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:526: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/checker.py:526: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeChecker"; expected "TypeCheckerState" [arg-type]
+ mypy/checker.py:530: error: Missing positional argument "prefix" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:530: error: Argument 1 to "__call__" of "Callable" has incompatible type "str"; expected "Scope" [arg-type]
+ mypy/checker.py:531: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:571: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:571: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/checker.py:571: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeChecker"; expected "TypeCheckerState" [arg-type]
+ mypy/checker.py:577: error: Missing positional argument "prefix" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:577: error: Argument 1 to "__call__" of "Callable" has incompatible type "str"; expected "Scope" [arg-type]
+ mypy/checker.py:594: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:594: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/checker.py:595: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:595: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "CheckerScope" [arg-type]
+ mypy/checker.py:605: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:611: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:612: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:725: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:725: error: Argument 1 to "__call__" of "Callable" has incompatible type "OverloadedFuncDef"; expected "Scope" [arg-type]
+ mypy/checker.py:725: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:784: error: Missing positional argument "impl" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:784: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncDef | Decorator"; expected "TypeChecker" [arg-type]
+ mypy/checker.py:947: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:947: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/checker.py:1201: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1201: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncDef"; expected "Scope" [arg-type]
+ mypy/checker.py:1201: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1232: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1237: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1314: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1344: error: Missing positional argument "item" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1344: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncItem"; expected "CheckerScope" [arg-type]
+ mypy/checker.py:1393: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1420: error: Missing positional argument "item" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1420: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncItem"; expected "CheckerScope" [arg-type]
+ mypy/checker.py:1620: error: Missing positional argument "item" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:1620: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncDef"; expected "CheckerScope" [arg-type]
+ mypy/checker.py:2684: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:2684: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Scope" [arg-type]
+ mypy/checker.py:2685: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:2686: error: Missing positional argument "type" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:2686: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "TypeChecker" [arg-type]
+ mypy/checker.py:2690: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:2691: error: Missing positional argument "info" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:2691: error: Argument 1 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "CheckerScope" [arg-type]
+ mypy/checker.py:3217: error: Missing positional argument "is_final_def" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:3217: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "TypeChecker" [arg-type]
+ mypy/checker.py:3245: error: Missing positional argument "is_final_def" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:3245: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "TypeChecker" [arg-type]
+ mypy/checker.py:4172: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:5608: error: Missing positional argument "fdef" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:5608: error: Argument 1 to "__call__" of "Callable" has incompatible type "FuncDef"; expected "Scope" [arg-type]
+ mypy/checker.py:5608: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/checker.py:7531: error: Signature of "checking_await_set" incompatible with supertype "TypeCheckerSharedApi" [override]
+ mypy/checker.py:7531: note: Superclass:
+ mypy/checker.py:7531: note: _collections_abc.Callable[[TypeCheckerSharedApi], _GeneratorContextManager[None, None, None]]
+ mypy/checker.py:7531: note: Subclass:
+ mypy/checker.py:7531: note: _collections_abc.Callable[[TypeChecker], _GeneratorContextManager[None, None, None]]
+ mypy/checker.py:7545: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypyc/lower/registry.py:17: error: Type variable "mypyc.lower.registry.LF" is unbound [valid-type]
+ mypyc/lower/registry.py:17: note: (Hint: Use "Generic[LF]" or "Protocol[LF]" base class to bind "LF" inside a class)
+ mypyc/lower/registry.py:17: note: (Hint: Use "LF" in function signature to bind "LF" inside a function)
+ mypyc/lower/list_ops.py:55: error: LF? not callable [misc]
+ mypy/semanal_main.py:188: error: Missing positional argument "options" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:188: error: Argument 1 to "__call__" of "Callable" has incompatible type "MypyFile"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal_main.py:188: error: Argument 2 to "__call__" of "Callable" has incompatible type "Options"; expected "MypyFile" [arg-type]
+ mypy/semanal_main.py:308: error: Missing positional argument "options" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:308: error: Argument 1 to "__call__" of "Callable" has incompatible type "MypyFile"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal_main.py:308: error: Argument 2 to "__call__" of "Callable" has incompatible type "Options"; expected "MypyFile" [arg-type]
+ mypy/semanal_main.py:375: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:412: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:413: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:413: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/semanal_main.py:432: error: Missing positional argument "self" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:433: error: Missing positional argument "value" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:433: error: Argument 1 to "__call__" of "Callable" has incompatible type "bool"; expected "StrictOptionalState" [arg-type]
+ mypy/semanal_main.py:439: error: Missing positional argument "saved" in call to "__call__" of "Callable" [call-arg]
+ mypy/semanal_main.py:439: error: Argument 1 to "__call__" of "Callable" has incompatible type "tuple[str, TypeInfo | None, FuncDef | OverloadedFuncDef | None]"; expected "Scope" [arg-type]
+ mypy/semanal_main.py:491: error: Argument 1 to "__call__" of "Callable" has incompatible type "MypyFile"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal_main.py:491: error: Argument 2 to "__call__" of "Callable" has incompatible type "Options"; expected "MypyFile" [arg-type]
+ mypy/semanal_main.py:491: error: Argument 3 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Options" [arg-type]
+ mypy/semanal_main.py:510: error: Argument 1 to "__call__" of "Callable" has incompatible type "MypyFile"; expected "SemanticAnalyzer" [arg-type]
+ mypy/semanal_main.py:510: error: Argument 2 to "__call__" of "Callable" has incompatible type "Options"; expected "MypyFile" [arg-type]
+ mypy/semanal_main.py:510: error: Argument 3 to "__call__" of "Callable" has incompatible type "TypeInfo"; expected "Options" [a
... (truncated 18318 lines) ... |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
discuss: https://discuss.python.org/t/callable-isnt-a-special-form/106407
typing.Callable is not a _SpecialForm, it's a _SpecialGenericAlias (represented with _Alias in the pyi), and collections.abc.Callable is a class, not a special form and has no special meaning in the type system
currently all the ABCs in collections.abc (sans Callable) are declared as runtime_checkable Protocols. while this is not technically accurate, it does a good job of describing their runtime behaviour. all of these types have corresponding aliases in typing. i am suggesting that we change the current type definition of Callable to follow the same pattern as the rest of these definitions. this change would make the definitions of Callable more accurate and more consistent with the other definitions in typing and collections.abc
i am trying to address many issues with Callable that are either 100% special cased, or don't currently work:
motivating example was that a ty maintiner rejected a suggestion to provide more accurate representation of Callable, and instead suggested fixing the problem in typeshed:
corresponding typing spec pr:
i believe this issue is blocked by missing variance on parameter specifications: