Skip to content

Fix generated docstrings when viewing resource methods in Jupyter #1315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sdk/aqueduct/resources/validation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from functools import wraps
from typing import Any, Callable

from aqueduct.utils.integration_validation import validate_integration_is_connected
Expand All @@ -10,6 +11,7 @@ def validate_is_connected() -> Callable[[AnyFunc], AnyFunc]:
ensures that the integration is connected before allowing the method to be called."""

def decorator(method: AnyFunc) -> Callable[[AnyFunc], AnyFunc]:
@wraps(method)
def wrapper(self: Any, *args: Any, **kwargs: Any) -> Any:
validate_integration_is_connected(self.name(), self._metadata.exec_state)
return method(self, *args, **kwargs)
Expand Down