Skip to content

Commit 3ea29f6

Browse files
dshabinVaghinak Basentsyan
authored andcommitted
Fix sphonx
1 parent 0e582dd commit 3ea29f6

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

docs/source/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,4 @@
5454
# so a file named "default.css" will overwrite the builtin "default.css".
5555
html_static_path = []
5656

57-
set_type_checking_flag = False
58-
always_document_param_types = False
57+
autodoc_typehints = "description"

docs/source/superannotate.sdk.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ ________
3838
.. autofunction:: superannotate.upload_images_to_project
3939
.. autofunction:: superannotate.attach_image_urls_to_project
4040
.. autofunction:: superannotate.upload_images_from_public_urls_to_project
41-
.. autofunction:: superannotate.upload_images_from_google_cloud_to_project
42-
.. autofunction:: superannotate.upload_images_from_azure_blob_to_project
41+
.. autofunction:: superannotate.upload_images_from_s3_bucket_to_project
42+
.. autofunction:: superannotate.attach_document_urls_to_project
4343
.. autofunction:: superannotate.upload_image_to_project
4444
.. _ref_upload_images_from_folder_to_project:
4545
.. autofunction:: superannotate.upload_images_from_folder_to_project

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,12 +2259,13 @@ def attach_image_urls_to_project(
22592259
logger.warning(
22602260
constances.ALREADY_EXISTING_FILES_WARNING.format(len(duplicate_images))
22612261
)
2262-
logger.info(
2263-
constances.ATTACHING_FILES_MESSAGE.format(
2264-
len(images_to_upload), project_folder_name
2265-
)
2266-
)
2262+
22672263
if use_case.is_valid():
2264+
logger.info(
2265+
constances.ATTACHING_FILES_MESSAGE.format(
2266+
len(images_to_upload), project_folder_name
2267+
)
2268+
)
22682269
with tqdm(
22692270
total=use_case.attachments_count, desc="Attaching urls"
22702271
) as progress_bar:
@@ -2316,12 +2317,13 @@ def attach_video_urls_to_project(
23162317
logger.warning(
23172318
constances.ALREADY_EXISTING_FILES_WARNING.format(len(duplicate_images))
23182319
)
2319-
logger.info(
2320-
constances.ATTACHING_FILES_MESSAGE.format(
2321-
len(images_to_upload), project_folder_name
2322-
)
2323-
)
2320+
23242321
if use_case.is_valid():
2322+
logger.info(
2323+
constances.ATTACHING_FILES_MESSAGE.format(
2324+
len(images_to_upload), project_folder_name
2325+
)
2326+
)
23252327
with tqdm(
23262328
total=use_case.attachments_count, desc="Attaching urls"
23272329
) as progress_bar:
@@ -3539,12 +3541,12 @@ def attach_document_urls_to_project(
35393541
logger.warning(
35403542
constances.ALREADY_EXISTING_FILES_WARNING.format(len(duplicate_images))
35413543
)
3542-
logger.info(
3543-
constances.ATTACHING_FILES_MESSAGE.format(
3544-
len(images_to_upload), project_folder_name
3545-
)
3546-
)
35473544
if use_case.is_valid():
3545+
logger.info(
3546+
constances.ATTACHING_FILES_MESSAGE.format(
3547+
len(images_to_upload), project_folder_name
3548+
)
3549+
)
35483550
with tqdm(
35493551
total=use_case.attachments_count, desc="Attaching urls"
35503552
) as progress_bar:

src/superannotate/lib/core/usecases/images.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3588,13 +3588,19 @@ def validate_limitations(self):
35883588
raise AppValidationException(constances.UPLOAD_PROJECT_LIMIT_ERROR_MESSAGE)
35893589
elif (
35903590
response.data.user_limit
3591-
and response.data.user_limit.remaining_image_count > 0
3591+
and response.data.user_limit.remaining_image_count < 1
35923592
):
35933593
raise AppValidationException(constances.UPLOAD_USER_LIMIT_ERROR_MESSAGE)
35943594

35953595
@property
35963596
def limit(self):
3597-
return self._limitation_response.data.folder_limit.remaining_image_count
3597+
limits = [
3598+
self._limitation_response.data.folder_limit.remaining_image_count,
3599+
self._limitation_response.data.project_limit.remaining_image_count,
3600+
]
3601+
if self._limitation_response.data.user_limit:
3602+
limits.append(self._limitation_response.data.user_limit.remaining_image_count)
3603+
return min(limits)
35983604

35993605
def validate_project_type(self):
36003606
if self._project.project_type in constances.LIMITED_FUNCTIONS:

0 commit comments

Comments
 (0)