Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
cc4d6899
Commit
cc4d6899
authored
Mar 19, 2022
by
David Hotham
Committed by
Arun Babu Neelicattu
Apr 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cache some Term methods
parent
038209ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/poetry/mixology/term.py
+4
-0
No files found.
src/poetry/mixology/term.py
View file @
cc4d6899
from
__future__
import
annotations
from
__future__
import
annotations
import
functools
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
poetry.mixology.set_relation
import
SetRelation
from
poetry.mixology.set_relation
import
SetRelation
...
@@ -46,6 +48,7 @@ class Term:
...
@@ -46,6 +48,7 @@ class Term:
and
self
.
relation
(
other
)
==
SetRelation
.
SUBSET
and
self
.
relation
(
other
)
==
SetRelation
.
SUBSET
)
)
@functools.lru_cache
(
maxsize
=
None
)
def
relation
(
self
,
other
:
Term
)
->
int
:
def
relation
(
self
,
other
:
Term
)
->
int
:
"""
"""
Returns the relationship between the package versions
Returns the relationship between the package versions
...
@@ -108,6 +111,7 @@ class Term:
...
@@ -108,6 +111,7 @@ class Term:
# not foo ^1.5.0 is a superset of not foo ^1.0.0
# not foo ^1.5.0 is a superset of not foo ^1.0.0
return
SetRelation
.
OVERLAPPING
return
SetRelation
.
OVERLAPPING
@functools.lru_cache
(
maxsize
=
None
)
def
intersect
(
self
,
other
:
Term
)
->
Term
|
None
:
def
intersect
(
self
,
other
:
Term
)
->
Term
|
None
:
"""
"""
Returns a Term that represents the packages
Returns a Term that represents the packages
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment