How to annotate a variable of an existing object? (working with mypy)

后端 未结 0 1311
暖寄归人
暖寄归人 2021-01-29 22:09
def get_source(import_name: str) -> Optional[str]:
    spec = get_spec(import_name)
    # Now, here. The spec.loader might be one of several values.
    # But I *know         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题