pip/src/pip/_vendor/resolvelib/reporters.py

38 lines
1.3 KiB
Python
Raw Normal View History

class BaseReporter(object):
2020-11-19 15:21:14 +01:00
"""Delegate class to provider progress reporting for the resolver."""
def starting(self):
2020-11-19 15:21:14 +01:00
"""Called before the resolution actually starts."""
def starting_round(self, index):
"""Called before each round of resolution starts.
The index is zero-based.
"""
def ending_round(self, index, state):
"""Called before each round of resolution ends.
This is NOT called if the resolution ends at this round. Use `ending`
if you want to report finalization. The index is zero-based.
"""
def ending(self, state):
2020-11-19 15:21:14 +01:00
"""Called before the resolution ends successfully."""
2020-04-10 16:39:29 +02:00
2020-05-19 11:08:12 +02:00
def adding_requirement(self, requirement, parent):
"""Called when adding a new requirement into the resolve criteria.
:param requirement: The additional requirement to be applied to filter
the available candidaites.
:param parent: The candidate that requires ``requirement`` as a
dependency, or None if ``requirement`` is one of the root
requirements passed in from ``Resolver.resolve()``.
2020-04-10 16:39:29 +02:00
"""
def backtracking(self, candidate):
2020-11-19 15:21:14 +01:00
"""Called when rejecting a candidate during backtracking."""
2020-04-10 16:39:29 +02:00
def pinning(self, candidate):
2020-11-19 15:21:14 +01:00
"""Called when adding a candidate to the potential solution."""