Skip to content

Commit

Permalink
Fix documentation for morpheus.loaders.sql_loader (#1264)
Browse files Browse the repository at this point in the history
Add `@wraps` decorator to `cm_skip_processing_if_failed` to allow docstrings for wrapped methods to generate documentation.

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md).
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: #1264
  • Loading branch information
dagardner-nv authored Oct 13, 2023
1 parent 61d9c8c commit 9348842
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions morpheus/utils/control_message_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def cm_skip_processing_if_failed(func: Callable[CM_SKIP_P, T]) -> Callable[CM_SK
The decorated function.
"""

@wraps(func)
def wrapper(control_message: ControlMessage, *args: CM_SKIP_P.args, **kwargs: CM_SKIP_P.kwargs) -> T:
if (control_message.has_metadata("cm_failed") and control_message.get_metadata("cm_failed")):
return control_message
Expand Down

0 comments on commit 9348842

Please sign in to comment.