本文整理匯總了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)
示例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)
示例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)