本文整理汇总了Python中mypy.types.Overloaded.name方法的典型用法代码示例。如果您正苦于以下问题:Python Overloaded.name方法的具体用法?Python Overloaded.name怎么用?Python Overloaded.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mypy.types.Overloaded
的用法示例。
在下文中一共展示了Overloaded.name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: no_variant_matches_arguments
# 需要导入模块: from mypy.types import Overloaded [as 别名]
# 或者: from mypy.types.Overloaded import name [as 别名]
def no_variant_matches_arguments(self, overload: Overloaded,
context: Context) -> None:
if overload.name():
self.fail('No overload variant of {} matches argument types'
.format(overload.name()), context)
else:
self.fail('No overload variant matches argument types', context)
示例2: no_variant_matches_arguments
# 需要导入模块: from mypy.types import Overloaded [as 别名]
# 或者: from mypy.types.Overloaded import name [as 别名]
def no_variant_matches_arguments(self, overload: Overloaded, arg_types: List[Type],
context: Context) -> None:
if overload.name():
self.fail('No overload variant of {} matches argument types {}'
.format(overload.name(), arg_types), context)
else:
self.fail('No overload variant matches argument types {}'.format(arg_types), context)