當前位置: 首頁>>代碼示例>>Python>>正文


Python PyPI.simple_url方法代碼示例

本文整理匯總了Python中pip._internal.models.index.PyPI.simple_url方法的典型用法代碼示例。如果您正苦於以下問題:Python PyPI.simple_url方法的具體用法?Python PyPI.simple_url怎麽用?Python PyPI.simple_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pip._internal.models.index.PyPI的用法示例。


在下文中一共展示了PyPI.simple_url方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_formatted_locations

# 需要導入模塊: from pip._internal.models.index import PyPI [as 別名]
# 或者: from pip._internal.models.index.PyPI import simple_url [as 別名]
def get_formatted_locations(self):
        # type: () -> str
        lines = []
        if self.index_urls and self.index_urls != [PyPI.simple_url]:
            lines.append(
                "Looking in indexes: {}".format(", ".join(
                    redact_password_from_url(url) for url in self.index_urls))
            )
        if self.find_links:
            lines.append(
                "Looking in links: {}".format(", ".join(self.find_links))
            )
        return "\n".join(lines) 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:15,代碼來源:index.py

示例2: get_formatted_locations

# 需要導入模塊: from pip._internal.models.index import PyPI [as 別名]
# 或者: from pip._internal.models.index.PyPI import simple_url [as 別名]
def get_formatted_locations(self):
        # type: () -> str
        lines = []
        if self.index_urls and self.index_urls != [PyPI.simple_url]:
            lines.append(
                'Looking in indexes: {}'.format(', '.join(
                    redact_auth_from_url(url) for url in self.index_urls))
            )
        if self.find_links:
            lines.append(
                'Looking in links: {}'.format(', '.join(
                    redact_auth_from_url(url) for url in self.find_links))
            )
        return '\n'.join(lines) 
開發者ID:pantsbuild,項目名稱:pex,代碼行數:16,代碼來源:search_scope.py

示例3: get_formatted_locations

# 需要導入模塊: from pip._internal.models.index import PyPI [as 別名]
# 或者: from pip._internal.models.index.PyPI import simple_url [as 別名]
def get_formatted_locations(self):
        lines = []
        if self.index_urls and self.index_urls != [PyPI.simple_url]:
            lines.append(
                "Looking in indexes: {}".format(", ".join(
                    remove_auth_from_url(url) for url in self.index_urls))
            )
        if self.find_links:
            lines.append(
                "Looking in links: {}".format(", ".join(self.find_links))
            )
        return "\n".join(lines) 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:14,代碼來源:index.py

示例4: get_formatted_locations

# 需要導入模塊: from pip._internal.models.index import PyPI [as 別名]
# 或者: from pip._internal.models.index.PyPI import simple_url [as 別名]
def get_formatted_locations(self):
        # type: () -> str
        lines = []
        redacted_index_urls = []
        if self.index_urls and self.index_urls != [PyPI.simple_url]:
            for url in self.index_urls:

                redacted_index_url = redact_auth_from_url(url)

                # Parse the URL
                purl = urllib_parse.urlsplit(redacted_index_url)

                # URL is generally invalid if scheme and netloc is missing
                # there are issues with Python and URL parsing, so this test
                # is a bit crude. See bpo-20271, bpo-23505. Python doesn't
                # always parse invalid URLs correctly - it should raise
                # exceptions for malformed URLs
                if not purl.scheme and not purl.netloc:
                    logger.warning(
                        'The index url "{}" seems invalid, '
                        'please provide a scheme.'.format(redacted_index_url))

                redacted_index_urls.append(redacted_index_url)

            lines.append('Looking in indexes: {}'.format(
                ', '.join(redacted_index_urls)))

        if self.find_links:
            lines.append(
                'Looking in links: {}'.format(', '.join(
                    redact_auth_from_url(url) for url in self.find_links))
            )
        return '\n'.join(lines) 
開發者ID:ali5h,項目名稱:rules_pip,代碼行數:35,代碼來源:search_scope.py

示例5: get_formatted_locations

# 需要導入模塊: from pip._internal.models.index import PyPI [as 別名]
# 或者: from pip._internal.models.index.PyPI import simple_url [as 別名]
def get_formatted_locations(self):
        # type: () -> str
        lines = []
        if self.index_urls and self.index_urls != [PyPI.simple_url]:
            lines.append(
                'Looking in indexes: {}'.format(', '.join(
                    redact_password_from_url(url) for url in self.index_urls))
            )
        if self.find_links:
            lines.append(
                'Looking in links: {}'.format(', '.join(
                    redact_password_from_url(url) for url in self.find_links))
            )
        return '\n'.join(lines) 
開發者ID:V1EngineeringInc,項目名稱:V1EngineeringInc-Docs,代碼行數:16,代碼來源:search_scope.py


注:本文中的pip._internal.models.index.PyPI.simple_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。