Closed brettcannon closed 11 months ago
It’s trying to say (iirc) for each candidate returned by find_matches
, identify(candidate)
should return the same value as identifier
. A rewording would be helpful…
Does that mean identify()
can be called on a candidate as well? The identify()
docstring only mentions requirements:
The typing suggests it can be either, but the README says " "requirement" ... SHOULD NOT be used when describing a Candidate, to avoid confusion", so that docstring might also be misleading.
And I'm happy to submit a PR to clear up the wording on all of this once I understand exactly what's expected.
Yes; the argument is called requirement_or_candidate
(and typed as Union[RT, CT]
). The docstring does indeed need some fixup.
I'll create a PR to try to clarify both docstrings.
https://github.com/sarugaku/resolvelib/pull/138 is my attempt to clarify things.
The docstring says the
identifier
parameter "identifies the dependency matches of which should be returned." Is this trying to say it "it identifies the dependency for which matches should be returned"?