parameters: (
  
          cls,
  
          find_links,  # type: List[str]
  
          index_urls,  # type: List[str]
  
      )
return_statement: return cls(
  
              find_links=built_find_links,
  
              index_urls=index_urls,
  
          )
docstring: Create a SearchScope object after normalizing the `find_links`.
function: def create(
  
          cls,
  
          find_links,  # type: List[str]
  
          index_urls,  # type: List[str]
  
      ):
  
          # type: (...) -> SearchScope
  
          """
  
          Create a SearchScope object after normalizing the `find_links`.
  
          """
  
          # Build find_links. If an argument starts with ~, it may be
  
          # a local file relative to a home directory. So try normalizing
  
          # it and if it exists, use the normalized version.
  
          # This is deliberately conservative - it might be fine just to
  
          # blindly normalize anything starting with a ~...
  
          built_find_links = []  # type: List[str]
  
          for link in find_links:
  
              if link.startswith('~'):
  
                  new_link = normalize_path(link)
  
                  if os.path.exists(new_link):
  
                      link = new_link
  
              built_find_links.append(link)
  
  
  
          # If we don't have TLS enabled, then WARN if anyplace we're looking
  
          # relies on TLS.
  
          if not has_tls():
  
              for link in itertools.chain(index_urls, built_find_links):
  
                  parsed = urllib.parse.urlparse(link)
  
                  if parsed.scheme == 'https':
  
                      logger.warning(
  
                          'pip is configured with locations that require '
  
                          'TLS/SSL, however the ssl module in Python is not '
  
                          'available.'
  
                      )
  
                      break
  
  
  
          return cls(
  
              find_links=built_find_links,
  
              index_urls=index_urls,
  
          )
function_tokens: def create ( cls , find_links , # type: List[str] index_urls , # type: List[str] ) : # type: (...) -> SearchScope # Build find_links. If an argument starts with ~, it may be # a local file relative to a home directory. So try normalizing # it and if it exists, use the normalized version. # This is deliberately conservative - it might be fine just to # blindly normalize anything starting with a ~... built_find_links = [ ] # type: List[str] for link in find_links : if link . startswith ( '~' ) : new_link = normalize_path ( link ) if os . path . exists ( new_link ) : link = new_link built_find_links . append ( link ) # If we don't have TLS enabled, then WARN if anyplace we're looking # relies on TLS. if not has_tls ( ) : for link in itertools . chain ( index_urls , built_find_links ) : parsed = urllib . parse . urlparse ( link ) if parsed . scheme == 'https' : logger . warning ( 'pip is configured with locations that require ' 'TLS/SSL, however the ssl module in Python is not ' 'available.' ) break return cls ( find_links = built_find_links , index_urls = index_urls , )