(func)
| 491 | # This is then checked in the generated init to check if required |
| 492 | # props were provided. |
| 493 | def _explicitize_args(func): |
| 494 | varnames = func.__code__.co_varnames |
| 495 | |
| 496 | def wrapper(*args, **kwargs): |
| 497 | if "_explicit_args" in kwargs: |
| 498 | raise Exception("Variable _explicit_args should not be set.") |
| 499 | kwargs["_explicit_args"] = list( |
| 500 | set(list(varnames[: len(args)]) + [k for k, _ in kwargs.items()]) |
| 501 | ) |
| 502 | if "self" in kwargs["_explicit_args"]: |
| 503 | kwargs["_explicit_args"].remove("self") |
| 504 | return func(*args, **kwargs) |
| 505 | |
| 506 | new_sig = inspect.signature(wrapper).replace( |
| 507 | parameters=list(inspect.signature(func).parameters.values()) |
| 508 | ) |
| 509 | wrapper.__signature__ = new_sig # type: ignore[reportFunctionMemberAccess] |
| 510 | return wrapper |
no outgoing calls
no test coverage detected
searching dependent graphs…