mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
4032bbbd17
Without `/` overload implies that it also accepts kw args, while the implementation signature doesn't support them.
13 lines
344 B
Python
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"
|