当前位置: 首页>>代码示例>>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;未经允许,请勿转载。