Files
Andrej730 4032bbbd17 entity_instance.py: fix oveloads signatures (f93d79dc)
Without `/` overload implies that it also accepts kw args, while the implementation signature doesn't support them.
2026-07-14 14:56:06 +05:00

13 lines
344 B
Python

from typing import Union, overload
class entity_instance:
@overload
def is_a(self) -> str: ...
@overload
def is_a(self, ifc_class: str, /) -> bool: ...
@overload
def is_a(self, with_schema: bool, /) -> str: ...
def is_a(self, *args: Union[str, bool]) -> Union[str, bool]:
return args[0] if args else "foo"