mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
Resolve: * resolve to the first implementation in class, if there is no implementation, resolve to the first overload * resolve to the last implementation in module, if there is no implementation, resolve to the last overload
24 lines
230 B
Python
24 lines
230 B
Python
from typing import overload
|
|
|
|
|
|
@overload
|
|
def foo(value: None) -> None:
|
|
pass
|
|
|
|
|
|
@overload
|
|
def foo(value: int) -> str:
|
|
pass
|
|
|
|
|
|
@overload
|
|
def foo(value: str) -> str:
|
|
pass
|
|
|
|
|
|
def foo(value):
|
|
return None
|
|
|
|
|
|
foo("abc")
|
|
<ref> |