Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
fddf096f
Commit
fddf096f
authored
May 29, 2020
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
b8b26006
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
provider.py
...-packages/pip/_internal/resolution/resolvelib/provider.py
+54
-0
No files found.
stbi/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py
0 → 100644
View file @
fddf096f
from
pip._vendor.resolvelib.providers
import
AbstractProvider
from
pip._internal.utils.typing
import
MYPY_CHECK_RUNNING
if
MYPY_CHECK_RUNNING
:
from
typing
import
Any
,
Optional
,
Sequence
,
Tuple
,
Union
from
pip._internal.req.req_install
import
InstallRequirement
from
.base
import
Requirement
,
Candidate
from
.factory
import
Factory
class
PipProvider
(
AbstractProvider
):
def
__init__
(
self
,
factory
,
# type: Factory
ignore_dependencies
,
# type: bool
):
# type: (...) -> None
self
.
_factory
=
factory
self
.
_ignore_dependencies
=
ignore_dependencies
def
get_install_requirement
(
self
,
c
):
# type: (Candidate) -> Optional[InstallRequirement]
return
c
.
get_install_requirement
()
def
identify
(
self
,
dependency
):
# type: (Union[Requirement, Candidate]) -> str
return
dependency
.
name
def
get_preference
(
self
,
resolution
,
# type: Optional[Candidate]
candidates
,
# type: Sequence[Candidate]
information
# type: Sequence[Tuple[Requirement, Candidate]]
):
# type: (...) -> Any
# Use the "usual" value for now
return
len
(
candidates
)
def
find_matches
(
self
,
requirement
):
# type: (Requirement) -> Sequence[Candidate]
return
requirement
.
find_matches
()
def
is_satisfied_by
(
self
,
requirement
,
candidate
):
# type: (Requirement, Candidate) -> bool
return
requirement
.
is_satisfied_by
(
candidate
)
def
get_dependencies
(
self
,
candidate
):
# type: (Candidate) -> Sequence[Requirement]
if
self
.
_ignore_dependencies
:
return
[]
return
candidate
.
get_dependencies
()
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