See RegisterIndicatorRegressionAlgorithm:
self.register_indicator(_symbol, indicator2, consolidator, lambda bar: self.set_selector_called(0) and bar)
MyPy output:
RegisterIndicatorRegressionAlgorithm.py_pd6njxkw:47: error: Argument 4 to "register_indicator" of "QCAlgorithm" has incompatible type "Callable[[IBaseData], Any | IBaseData]"; expected "Callable[[IBaseData], float]" [arg-type]
The stubs only have the overloads that take the selector returning a float because the other ones (with selectors that return IBaseData) are generic and not added to the stubs.
See
RegisterIndicatorRegressionAlgorithm:MyPy output:
The stubs only have the overloads that take the selector returning a
floatbecause the other ones (with selectors that return IBaseData) are generic and not added to the stubs.