Skip to content

Commit

Permalink
Merge pull request #164 from sarugaku:fix/criterion
Browse files Browse the repository at this point in the history
fix: export criterion in resolvers to keep compatibility
  • Loading branch information
frostming authored Aug 1, 2024
2 parents d4a1da9 + d8be45d commit ff700ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/resolvelib/reporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .structs import CT, KT, RT, RequirementInformation, State

if TYPE_CHECKING:
from .resolvers.criterion import Criterion
from .resolvers import Criterion


class BaseReporter(Generic[RT, CT, KT]):
Expand Down
2 changes: 2 additions & 0 deletions src/resolvelib/resolvers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from ..structs import RequirementInformation
from .abstract import AbstractResolver, Result
from .criterion import Criterion
from .exceptions import (
InconsistentCandidate,
RequirementsConflicted,
Expand All @@ -22,4 +23,5 @@
"RequirementInformation",
"ResolverException",
"Result",
"Criterion",
]
7 changes: 5 additions & 2 deletions tests/test_resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
if TYPE_CHECKING:
from typing import Iterable, Mapping

from resolvelib.resolvers import RequirementInformation, RequirementsConflicted
from resolvelib.resolvers.criterion import Criterion
from resolvelib.resolvers import (
Criterion,
RequirementInformation,
RequirementsConflicted,
)


def test_candidate_inconsistent_error():
Expand Down

0 comments on commit ff700ea

Please sign in to comment.