当前位置: 首页>>代码示例>>Python>>正文


Python setuptools.run_2to3_on_doctests方法代码示例

本文整理汇总了Python中setuptools.run_2to3_on_doctests方法的典型用法代码示例。如果您正苦于以下问题:Python setuptools.run_2to3_on_doctests方法的具体用法?Python setuptools.run_2to3_on_doctests怎么用?Python setuptools.run_2to3_on_doctests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在setuptools的用法示例。


在下文中一共展示了setuptools.run_2to3_on_doctests方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run_2to3

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import run_2to3_on_doctests [as 别名]
def run_2to3(self, files, doctests = False):
        # See of the distribution option has been set, otherwise check the
        # setuptools default.
        if self.distribution.use_2to3 is not True:
            return
        if not files:
            return
        log.info("Fixing "+" ".join(files))
        self.__build_fixer_names()
        self.__exclude_fixers()
        if doctests:
            if setuptools.run_2to3_on_doctests:
                r = DistutilsRefactoringTool(self.fixer_names)
                r.refactor(files, write=True, doctests_only=True)
        else:
            _Mixin2to3.run_2to3(self, files) 
开发者ID:jpush,项目名称:jbox,代码行数:18,代码来源:lib2to3_ex.py

示例2: run_2to3

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import run_2to3_on_doctests [as 别名]
def run_2to3(self, files, doctests=False):
        # See of the distribution option has been set, otherwise check the
        # setuptools default.
        if self.distribution.use_2to3 is not True:
            return
        if not files:
            return
        log.info("Fixing " + " ".join(files))
        self.__build_fixer_names()
        self.__exclude_fixers()
        if doctests:
            if setuptools.run_2to3_on_doctests:
                r = DistutilsRefactoringTool(self.fixer_names)
                r.refactor(files, write=True, doctests_only=True)
        else:
            _Mixin2to3.run_2to3(self, files) 
开发者ID:sofia-netsurv,项目名称:python-netsurv,代码行数:18,代码来源:lib2to3_ex.py

示例3: run_2to3

# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import run_2to3_on_doctests [as 别名]
def run_2to3(self, files, doctests=False):
        # See of the distribution option has been set, otherwise check the
        # setuptools default.
        if self.distribution.use_2to3 is not True:
            return
        if not files:
            return

        warnings.warn(
            "2to3 support is deprecated. If the project still "
            "requires Python 2 support, please migrate to "
            "a single-codebase solution or employ an "
            "independent conversion process.",
            SetuptoolsDeprecationWarning)
        log.info("Fixing " + " ".join(files))
        self.__build_fixer_names()
        self.__exclude_fixers()
        if doctests:
            if setuptools.run_2to3_on_doctests:
                r = DistutilsRefactoringTool(self.fixer_names)
                r.refactor(files, write=True, doctests_only=True)
        else:
            _Mixin2to3.run_2to3(self, files) 
开发者ID:pypa,项目名称:setuptools,代码行数:25,代码来源:lib2to3_ex.py


注:本文中的setuptools.run_2to3_on_doctests方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。