with_external¶
- dnois.utils.with_external(func: Callable = None, *, exclude: str | Sequence[str] = ()) Callable ¶
A decorator to mark a method as having external parameters. The decorated method will be called with the actual value of the external parameters if no value is provided (specifically,
None
).Note
The default value of a parameter of a decorated function is omitted unless it is contained in
exclude
.