sarugaku / resolvelib

Resolve abstract dependencies into concrete ones

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typing inconsistency: `AbstractProvider.get_preferences`

woodruffw opened this issue · comments

Here's how AbstractProvider.get_preferences is defined:

    def get_preference(
        self,
        identifier,
        resolutions,
        candidates,
        information,
        backtrack_causes,
    ):

and here's the .pyi definition:

    def get_preference(
        self,
        identifier: KT,
        resolutions: Mapping[KT, CT],
        candidates: Mapping[KT, Iterator[CT]],
        information: Mapping[KT, Iterator[RequirementInformation[RT, CT]]],
    ) -> Preference: ...

Note that the latter is missing backtrack_causes, so any downstream consumers of resolvelib's type hints won't be able to use the signature.

I'm happy to make a small PR fixing this!

Ah, this would be great of you! It's been on my TODO list for a while but I still can't submit PRs for another week.