AlbertUnruhUtils.utils.decorator module¶
- AlbertUnruhUtils.utils.decorator.deprecated(since: Optional[Union[str, tuple[int]]] = None, *, instead: Optional[Union[str, Callable]] = None, update_docs: bool = True) Callable[[AlbertUnruhUtils.utils.decorator._Function], AlbertUnruhUtils.utils.decorator._Function]¶
Marks a function/method as deprecated.
- Parameters
since (_Version) – Since when the function/method is deprecated.
instead (str, Callable, optional) – What function/method should be used instead.
update_docs (bool) – Whether the docs should be updated or not.
- Return type
Callable[[AlbertUnruhUtils.utils.decorator._Function], AlbertUnruhUtils.utils.decorator._Function]
- AlbertUnruhUtils.utils.decorator.copy_docs(docs: Union[str, object], *, append: bool = False, add_copy_note: bool = False, custom_origin: Optional[str] = None) Callable[[AlbertUnruhUtils.utils.decorator._Function], AlbertUnruhUtils.utils.decorator._Function]¶
Copies docs from an object or str to the decorated function/method/class.
- Parameters
docs (str, object) – The docs to copy.
append (bool) – Whether the docs should be appended or be replaced.
add_copy_note (bool) – Whether the docs should have a note that it was copied or not.
custom_origin (str, optional) – The origin which should be displayed if
add_copy_noteis set toTrue.
- Return type
Callable[[AlbertUnruhUtils.utils.decorator._Function], AlbertUnruhUtils.utils.decorator._Function]
- AlbertUnruhUtils.utils.decorator.not_implemented(reason: Optional[str] = None, *, update_docs: bool = True) Callable[[AlbertUnruhUtils.utils.decorator._Function], AlbertUnruhUtils.utils.decorator._Function]¶
Marks a function/method as not implemented, but as coming soon. (And they might open a PR to implement it for you :D)
- Parameters
reason (str) – The reason why this function/method is not implemented yet.
update_docs (bool) – Whether the docs should be updated or not.
- Return type
Callable[[AlbertUnruhUtils.utils.decorator._Function], AlbertUnruhUtils.utils.decorator._Function]