Typing inconsistency: `AbstractProvider.get_preferences`
woodruffw opened this issue · comments
William Woodruff commented
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!
Damian Shaw commented
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.