(
        cls,
        search_scope,  # type: SearchScope
        selection_prefs,     # type: SelectionPreferences
        trusted_hosts=None,  # type: Optional[List[str]]
        session=None,        # type: Optional[PipSession]
        target_python=None,  # type: Optional[TargetPython]
    )
return cls(
            candidate_prefs=candidate_prefs,
            search_scope=search_scope,
            session=session,
            target_python=target_python,
            allow_yanked=selection_prefs.allow_yanked,
            format_control=selection_prefs.format_control,
            trusted_hosts=trusted_hosts,
            ignore_requires_python=selection_prefs.ignore_requires_python,
        )
Create a PackageFinder.

        :param selection_prefs: The candidate selection preferences, as a
            SelectionPreferences object.
        :param trusted_hosts: Domains not to emit warnings for when not using
            HTTPS.
        :param session: The Session to use to make requests.
        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
Create a PackageFinder.
Create a PackageFinder .
def create(
        cls,
        search_scope,  # type: SearchScope
        selection_prefs,     # type: SelectionPreferences
        trusted_hosts=None,  # type: Optional[List[str]]
        session=None,        # type: Optional[PipSession]
        target_python=None,  # type: Optional[TargetPython]
    ):
        # type: (...) -> PackageFinder
        """Create a PackageFinder.

        :param selection_prefs: The candidate selection preferences, as a
            SelectionPreferences object.
        :param trusted_hosts: Domains not to emit warnings for when not using
            HTTPS.
        :param session: The Session to use to make requests.
        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
        """
        if session is None:
            raise TypeError(
                "PackageFinder.create() missing 1 required keyword argument: "
                "'session'"
            )
        if target_python is None:
            target_python = TargetPython()

        candidate_prefs = CandidatePreferences(
            prefer_binary=selection_prefs.prefer_binary,
            allow_all_prereleases=selection_prefs.allow_all_prereleases,
        )

        return cls(
            candidate_prefs=candidate_prefs,
            search_scope=search_scope,
            session=session,
            target_python=target_python,
            allow_yanked=selection_prefs.allow_yanked,
            format_control=selection_prefs.format_control,
            trusted_hosts=trusted_hosts,
            ignore_requires_python=selection_prefs.ignore_requires_python,
        )
def create ( cls , search_scope , # type: SearchScope selection_prefs , # type: SelectionPreferences trusted_hosts = None , # type: Optional[List[str]] session = None , # type: Optional[PipSession] target_python = None , # type: Optional[TargetPython] ) : # type: (...) -> PackageFinder if session is None : raise TypeError ( "PackageFinder.create() missing 1 required keyword argument: " "'session'" ) if target_python is None : target_python = TargetPython ( ) candidate_prefs = CandidatePreferences ( prefer_binary = selection_prefs . prefer_binary , allow_all_prereleases = selection_prefs . allow_all_prereleases , ) return cls ( candidate_prefs = candidate_prefs , search_scope = search_scope , session = session , target_python = target_python , allow_yanked = selection_prefs . allow_yanked , format_control = selection_prefs . format_control , trusted_hosts = trusted_hosts , ignore_requires_python = selection_prefs . ignore_requires_python , )