We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f84905 commit 1bc2959Copy full SHA for 1bc2959
src/poetry/mixology/term.py
@@ -1,5 +1,7 @@
1
from __future__ import annotations
2
3
+import functools
4
+
5
from typing import TYPE_CHECKING
6
7
from poetry.mixology.set_relation import SetRelation
@@ -46,6 +48,7 @@ def satisfies(self, other: Term) -> bool:
46
48
and self.relation(other) == SetRelation.SUBSET
47
49
)
50
51
+ @functools.lru_cache(maxsize=None)
52
def relation(self, other: Term) -> int:
53
"""
54
Returns the relationship between the package versions
@@ -108,6 +111,7 @@ def relation(self, other: Term) -> int:
108
111
# not foo ^1.5.0 is a superset of not foo ^1.0.0
109
112
return SetRelation.OVERLAPPING
110
113
114
115
def intersect(self, other: Term) -> Term | None:
116
117
Returns a Term that represents the packages
0 commit comments