-
Notifications
You must be signed in to change notification settings - Fork 15
feat: [Hackathron] Docstring linter #1037
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -163,8 +163,8 @@ def update_collection(self, name: Optional[str] = None, description: Optional[st | |||||||||
| """Update the collection's name and/or description. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| name (Optional[str]): The new name for the collection. | ||||||||||
| description (Optional[str]): The new description for the collection. | ||||||||||
| name: The new name for the collection. | ||||||||||
| description: The new description for the collection. | ||||||||||
| """ | ||||||||||
| payload = UpdateCollectionPayload(name=name, description=description) | ||||||||||
| self._client.patch( | ||||||||||
|
|
@@ -182,11 +182,11 @@ def list_items( | |||||||||
| """List storage items in the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| include_client_metadata (Optional[bool]): Whether to include client metadata for each item. | ||||||||||
| page_size (Optional[int]): The number of items to fetch per page. | ||||||||||
| include_client_metadata: Whether to include client metadata for each item. | ||||||||||
| page_size: The number of items to fetch per page. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| Iterator[StorageItem]: An iterator containing storage items in the collection. | ||||||||||
| Iterator[:class:`~encord.storage.StorageItem`]: An iterator containing storage items in the collection. | ||||||||||
| """ | ||||||||||
| params = GetCollectionItemsParams(includeClientMetadata=include_client_metadata, pageSize=page_size) | ||||||||||
| paged_items = self._client.get_paged_iterator( | ||||||||||
|
|
@@ -203,11 +203,11 @@ def list_items_include_inaccessible( | |||||||||
| """List storage items in the collection, including those that are inaccessible. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| include_client_metadata (Optional[bool]): Whether to include client metadata for each item. | ||||||||||
| page_size (Optional[int]): The number of items to fetch per page. | ||||||||||
| include_client_metadata: Whether to include client metadata for each item. | ||||||||||
| page_size: The number of items to fetch per page. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| Iterator[Union[StorageItem, StorageItemInaccessible]]: An iterator containing both accessible | ||||||||||
| Iterator[Union[:class:`~encord.storage.StorageItem`, :class:`~encord.storage.StorageItem`Inaccessible]]: An iterator containing both accessible | ||||||||||
| and inaccessible storage items in the collection. | ||||||||||
|
Comment on lines
+210
to
211
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The generated reference for
Suggested change
|
||||||||||
| """ | ||||||||||
| params = GetCollectionItemsParams(includeClientMetadata=include_client_metadata, pageSize=page_size) | ||||||||||
|
|
@@ -228,8 +228,8 @@ def add_items(self, storage_item_uuids: Sequence[Union[UUID, str]]) -> Collectio | |||||||||
| """Add storage items to the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| storage_item_uuids (Sequence[Union[UUID, str]]): The list of storage item UUIDs to be added. | ||||||||||
| Either UUIDs or string representations of UUIDs are accepted. | ||||||||||
| storage_item_uuids: The list of storage item UUIDs to be added. | ||||||||||
| Either UUIDs or string representations of UUIDs are accepted. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| CollectionBulkItemResponse: The response after adding items to the collection. | ||||||||||
|
|
@@ -247,8 +247,8 @@ def remove_items(self, storage_item_uuids: Sequence[Union[UUID, str]]) -> Collec | |||||||||
| """Remove storage items from the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| storage_item_uuids (Sequence[Union[UUID, str]]): The list of storage item UUIDs to be removed. | ||||||||||
| Either UUIDs or string representations of UUIDs are accepted. | ||||||||||
| storage_item_uuids: The list of storage item UUIDs to be removed. | ||||||||||
| Either UUIDs or string representations of UUIDs are accepted. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| CollectionBulkItemResponse: The response after removing items from the collection. | ||||||||||
|
|
@@ -266,7 +266,7 @@ def add_preset_items(self, filter_preset: Union[FilterPreset, UUID, str]) -> Non | |||||||||
| """Async operation to add storage items matching a filter preset to the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| filter_preset (Union[FilterPreset, UUID, str]): The filter preset or its UUID/ID used to filter items. | ||||||||||
| filter_preset: The filter preset or its UUID/ID used to filter items. | ||||||||||
| """ | ||||||||||
| if isinstance(filter_preset, FilterPreset): | ||||||||||
| preset_uuid = filter_preset.uuid | ||||||||||
|
|
@@ -289,7 +289,7 @@ def remove_preset_items(self, filter_preset: Union[FilterPreset, UUID, str]) -> | |||||||||
| """Async operation to remove storage items matching a filter preset from the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| filter_preset (Union[FilterPreset, UUID, str]): The filter preset or its UUID/ID used to filter items. | ||||||||||
| filter_preset: The filter preset or its UUID/ID used to filter items. | ||||||||||
| """ | ||||||||||
| if isinstance(filter_preset, FilterPreset): | ||||||||||
| preset_uuid = filter_preset.uuid | ||||||||||
|
|
@@ -467,8 +467,8 @@ def update_collection(self, name: Optional[str] = None, description: Optional[st | |||||||||
| """Update the collection's name and/or description. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| name (Optional[str]): The new name for the collection. | ||||||||||
| description (Optional[str]): The new description for the collection. | ||||||||||
| name: The new name for the collection. | ||||||||||
| description: The new description for the collection. | ||||||||||
| """ | ||||||||||
| payload = UpdateCollectionPayload(name=name, description=description) | ||||||||||
| self._client.patch( | ||||||||||
|
|
@@ -485,10 +485,10 @@ def list_frames( | |||||||||
| """List frames in the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| page_size (Optional[int]): The number of items to fetch per page. | ||||||||||
| page_size: The number of items to fetch per page. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| Iterator[Tuple[LabelRowV2, List[ProjectDataCollectionInstance]]]: An list of tuples containing label | ||||||||||
| Iterator[Tuple[:class:`~encord.objects.LabelRowV2`, List[ProjectDataCollectionInstance]]]: An list of tuples containing label | ||||||||||
| row and corresponding frame instances in the collection. | ||||||||||
| """ | ||||||||||
| params = GetCollectionItemsParams(pageSize=page_size) | ||||||||||
|
|
@@ -515,10 +515,10 @@ def list_annotations( | |||||||||
| """List annotations in the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| page_size (Optional[int]): The number of items to fetch per page. | ||||||||||
| page_size: The number of items to fetch per page. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| Iterator[Tuple[LabelRowV2, List[ProjectLabelCollectionInstance]]]: An list of tuples containing label | ||||||||||
| Iterator[Tuple[:class:`~encord.objects.LabelRowV2`, List[ProjectLabelCollectionInstance]]]: An list of tuples containing label | ||||||||||
| row and corresponding label instances in the collection. | ||||||||||
| """ | ||||||||||
| params = GetCollectionItemsParams(pageSize=page_size) | ||||||||||
|
|
@@ -544,7 +544,7 @@ def add_items( | |||||||||
| """Add data items to the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| items (Sequence[ProjectDataCollectionItemRequest | ProjectLabelCollectionItemRequest]): The list of data items to be added. | ||||||||||
| items: The list of data items to be added. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| ProjectCollectionBulkItemResponse: The response after adding items to the collection. | ||||||||||
|
|
@@ -563,7 +563,7 @@ def remove_items( | |||||||||
| """Remove data items from the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| items (Sequence[ProjectDataCollectionItemRequest | ProjectLabelCollectionItemRequest]): The list of data items to be removed. | ||||||||||
| items: The list of data items to be removed. | ||||||||||
|
|
||||||||||
| Returns: | ||||||||||
| ProjectCollectionBulkItemResponse: The response after removing items from the collection. | ||||||||||
|
|
@@ -580,7 +580,7 @@ def add_preset_items(self, filter_preset: Union[FilterPreset, UUID, str]) -> Non | |||||||||
| """Async operation to add storage items matching a filter preset to the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| filter_preset (Union[FilterPreset, UUID, str]): The filter preset or its UUID/ID used to filter items. | ||||||||||
| filter_preset: The filter preset or its UUID/ID used to filter items. | ||||||||||
| """ | ||||||||||
| if isinstance(filter_preset, FilterPreset): | ||||||||||
| preset_uuid = filter_preset.uuid | ||||||||||
|
|
@@ -603,7 +603,7 @@ def remove_preset_items(self, filter_preset: Union[FilterPreset, UUID, str]) -> | |||||||||
| """Async operation to remove storage items matching a filter preset from the collection. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| filter_preset (Union[FilterPreset, UUID, str]): The filter preset or its UUID/ID used to filter items. | ||||||||||
| filter_preset: The filter preset or its UUID/ID used to filter items. | ||||||||||
| """ | ||||||||||
| if isinstance(filter_preset, FilterPreset): | ||||||||||
| preset_uuid = filter_preset.uuid | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The auto-generated docstring contains a grammatical error: '...a list of :class:
~encord.orm.dataset.DataRows object...'. This should be '...a list of :class:~encord.orm.dataset.DataRowobjects...'. This suggests a potential issue in the linter's pluralization logic.