當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。