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
c5ce4d03
Commit
c5ce4d03
authored
Jul 24, 2022
by
David Hotham
Committed by
Bjorn Neergaard
Jul 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary double-dictionary
parent
fbc0ebcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
src/poetry/mixology/partial_solution.py
+4
-13
No files found.
src/poetry/mixology/partial_solution.py
View file @
c5ce4d03
...
@@ -44,7 +44,7 @@ class PartialSolution:
...
@@ -44,7 +44,7 @@ class PartialSolution:
# map.
# map.
#
#
# This is derived from self._assignments.
# This is derived from self._assignments.
self
.
_negative
:
dict
[
str
,
dict
[
str
,
Term
]
]
=
{}
self
.
_negative
:
dict
[
str
,
Term
]
=
{}
# The number of distinct solutions that have been attempted so far.
# The number of distinct solutions that have been attempted so far.
self
.
_attempted_solutions
=
1
self
.
_attempted_solutions
=
1
...
@@ -162,9 +162,7 @@ class PartialSolution:
...
@@ -162,9 +162,7 @@ class PartialSolution:
return
return
ref
=
assignment
.
dependency
.
complete_name
old_negative
=
self
.
_negative
.
get
(
name
)
negative_by_ref
=
self
.
_negative
.
get
(
name
)
old_negative
=
None
if
negative_by_ref
is
None
else
negative_by_ref
.
get
(
ref
)
term
=
(
term
=
(
assignment
if
old_negative
is
None
else
assignment
.
intersect
(
old_negative
)
assignment
if
old_negative
is
None
else
assignment
.
intersect
(
old_negative
)
)
)
...
@@ -176,10 +174,7 @@ class PartialSolution:
...
@@ -176,10 +174,7 @@ class PartialSolution:
self
.
_positive
[
name
]
=
term
self
.
_positive
[
name
]
=
term
else
:
else
:
if
name
not
in
self
.
_negative
:
self
.
_negative
[
name
]
=
term
self
.
_negative
[
name
]
=
{}
self
.
_negative
[
name
][
ref
]
=
term
def
satisfier
(
self
,
term
:
Term
)
->
Assignment
:
def
satisfier
(
self
,
term
:
Term
)
->
Assignment
:
"""
"""
...
@@ -222,11 +217,7 @@ class PartialSolution:
...
@@ -222,11 +217,7 @@ class PartialSolution:
if
positive
is
not
None
:
if
positive
is
not
None
:
return
positive
.
relation
(
term
)
return
positive
.
relation
(
term
)
by_ref
=
self
.
_negative
.
get
(
term
.
dependency
.
complete_name
)
negative
=
self
.
_negative
.
get
(
term
.
dependency
.
complete_name
)
if
by_ref
is
None
:
return
SetRelation
.
OVERLAPPING
negative
=
by_ref
[
term
.
dependency
.
complete_name
]
if
negative
is
None
:
if
negative
is
None
:
return
SetRelation
.
OVERLAPPING
return
SetRelation
.
OVERLAPPING
...
...
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