本文整理汇总了Python中formatter.Formatter.print_pretty_fail_message方法的典型用法代码示例。如果您正苦于以下问题:Python Formatter.print_pretty_fail_message方法的具体用法?Python Formatter.print_pretty_fail_message怎么用?Python Formatter.print_pretty_fail_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类formatter.Formatter
的用法示例。
在下文中一共展示了Formatter.print_pretty_fail_message方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: branches_to_be_deleted
# 需要导入模块: from formatter import Formatter [as 别名]
# 或者: from formatter.Formatter import print_pretty_fail_message [as 别名]
def branches_to_be_deleted(self):
"""Return branches to be deleted."""
branches = self.branches_to_be_deleted_excluding_skipped()
if len(branches) > 0:
Formatter.print_pretty_warn_message("Following local branches would \
be deleted:")
return branches
else:
Formatter.print_pretty_fail_message("No branches to be deleted")
return []
示例2: warn_if_no_branch_matches_pattern
# 需要导入模块: from formatter import Formatter [as 别名]
# 或者: from formatter.Formatter import print_pretty_fail_message [as 别名]
def warn_if_no_branch_matches_pattern(self, branches):
"""Show message if no branch matches the specified pattern."""
if len(branches) == 0:
Formatter.print_pretty_fail_message("No branch name matches the \
given skip pattern: " + " " + Formatter.UNDERLINE + str(self.
skip_pattern()))