From 5d8048116640fa672d6a1d700a6c1111faf87bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Socha?= <31014760+lukaszsocha2@users.noreply.github.com> Date: Thu, 3 Mar 2022 11:58:18 +0100 Subject: [PATCH] fix: Add missing `box_sign` object to `__all__` list (#708) Closes: SDK-1779 --- boxsdk/exception.py | 2 +- boxsdk/object/__init__.py | 9 ++++++--- boxsdk/util/enum.py | 2 +- boxsdk/util/log.py | 2 +- docs/usage/sign_requests.md | 10 ---------- 5 files changed, 9 insertions(+), 16 deletions(-) diff --git a/boxsdk/exception.py b/boxsdk/exception.py index d0578777..31e138cc 100644 --- a/boxsdk/exception.py +++ b/boxsdk/exception.py @@ -112,4 +112,4 @@ def __str__(self): f'\nHeaders: {headers}' -__all__ = list(map(str, ['BoxException', 'BoxAPIException', 'BoxOAuthException', 'BoxNetworkException'])) +__all__ = ['BoxException', 'BoxAPIException', 'BoxOAuthException', 'BoxNetworkException'] diff --git a/boxsdk/object/__init__.py b/boxsdk/object/__init__.py index 3fb6121e..25fc564b 100644 --- a/boxsdk/object/__init__.py +++ b/boxsdk/object/__init__.py @@ -1,4 +1,4 @@ -__all__ = list(map(str, [ +__all__ = [ 'collaboration', 'collaboration_allowlist', 'collaboration_allowlist_entry', @@ -13,8 +13,10 @@ 'file_version', 'file_version_retention', 'folder', + 'folder_lock', 'group', 'group_membership', + 'invite', 'legal_hold', 'legal_hold_policy', 'legal_hold_policy_assignment', @@ -24,6 +26,7 @@ 'retention_policy', 'retention_policy_assignment', 'search', + 'sign_request', 'storage_policy', 'storage_policy_assignment', 'terms_of_service', @@ -35,5 +38,5 @@ 'upload_session', 'webhook', 'watermark', - 'web_link', -])) + 'web_link' +] diff --git a/boxsdk/util/enum.py b/boxsdk/util/enum.py index 052927df..4d9ed882 100644 --- a/boxsdk/util/enum.py +++ b/boxsdk/util/enum.py @@ -5,7 +5,7 @@ from enum import EnumMeta -__all__ = list(map(str, ['ExtendableEnumMeta'])) +__all__ = ['ExtendableEnumMeta'] from typing import Any diff --git a/boxsdk/util/log.py b/boxsdk/util/log.py index eb4fc6c3..f49c7492 100644 --- a/boxsdk/util/log.py +++ b/boxsdk/util/log.py @@ -96,4 +96,4 @@ def sanitize_dictionary(dictionary: Mapping) -> dict: logging.getLogger(__name__).addHandler(logging.NullHandler()) -__all__ = list(map(str, ['setup_logging', 'sanitize_dictionary'])) +__all__ = ['setup_logging', 'sanitize_dictionary'] diff --git a/docs/usage/sign_requests.md b/docs/usage/sign_requests.md index 9ac1d8f2..7d91f25d 100644 --- a/docs/usage/sign_requests.md +++ b/docs/usage/sign_requests.md @@ -24,8 +24,6 @@ method will create a Sign Request. You need to provide at least one file (from w ```python -from boxsdk.object.sign_request import SignRequest - source_file = { 'id': '12345', 'type': 'file' @@ -56,8 +54,6 @@ will return an iterable that will page through all the Sign Requests. This metho ```python -from boxsdk.object.sign_request import SignRequest - sign_requests = client.get_sign_requests() for sign_request in sign_requests: print(f'(Sign Request ID: {sign_request.id})') @@ -74,8 +70,6 @@ The `fields` parameter is used to specify what additional properties should be r ```python -from boxsdk.object.sign_request import SignRequest - sign_request = client.sign_request(sign_request_id='12345').get() print(f'Sign Request ID is {sign_request.id}') ``` @@ -89,8 +83,6 @@ Calling [`sign_requests.cancel()`][cancel-sign-request] will cancel a created Si ```python -from boxsdk.object.sign_request import SignRequest - sign_request = client.sign_request(sign_request_id='12345') cancelled_sign_request = sign_request.cancel() print(f'Cancelled Sign Request status is {cancelled_sign_request.status}') @@ -106,8 +98,6 @@ There is an 10-minute cooling-off period between re-sending reminder emails. ```python -from boxsdk.object.sign_request import SignRequest - sign_request = client.sign_request(sign_request_id='12345') sign_request.resend() ```