Skip to content

Missing RegisterIndicator overloads #77

@jhonabreul

Description

@jhonabreul

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions