Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 26, 2024
1 parent 8ad905c commit eb412f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
from utils.file_storage.helpers.prompt_studio_file_helper import PromptStudioFileHelper
from utils.local_context import StateStore

from unstract.core.pubsub_helper import LogPublisher
from backend.constants import FeatureFlag
from unstract.core.pubsub_helper import LogPublisher
from unstract.flags.feature_flag import check_feature_flag_status

CHOICES_JSON = "/static/select_choices.json"
Expand Down
2 changes: 1 addition & 1 deletion backend/prompt_studio/prompt_studio_core_v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
from utils.file_storage.helpers.prompt_studio_file_helper import PromptStudioFileHelper
from utils.user_session import UserSessionUtils

from unstract.connectors.filesystems.local_storage.local_storage import LocalStorageFS
from backend.constants import FeatureFlag
from unstract.connectors.filesystems.local_storage.local_storage import LocalStorageFS
from unstract.flags.feature_flag import check_feature_flag_status

from .models import CustomTool
Expand Down
10 changes: 5 additions & 5 deletions backend/utils/file_storage/helpers/prompt_studio_file_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_or_create_prompt_studio_subdirectory(
def upload_for_ide(
org_id: str, user_id: str, tool_id: str, uploaded_file: Any
) -> None:
""" Uploads the file to a remote storage
"""Uploads the file to a remote storage
Args:
org_id (str): Organization ID
Expand All @@ -75,8 +75,8 @@ def upload_for_ide(
def fetch_file_contents(
org_id: str, user_id: str, tool_id: str, file_name: str
) -> Union[bytes, str]:
""" Method to fetch file contents from the remote location.
The path is constructed in runtime based on the args """
"""Method to fetch file contents from the remote location.
The path is constructed in runtime based on the args"""
fs_instance = FileStorageHelper.initialize_file_storage(
type=FileStorageType.PERMANENT
)
Expand Down Expand Up @@ -136,7 +136,7 @@ def fetch_file_contents(

@staticmethod
def delete_for_ide(org_id: str, user_id: str, tool_id: str, file_name: str) -> bool:
""" Method to delete file in remote while the corresponsing prompt
"""Method to delete file in remote while the corresponsing prompt
studio project is deleted or the file is removed from the file manager.
This method handles deleted for related files as well."""
fs_instance = FileStorageHelper.initialize_file_storage(
Expand Down Expand Up @@ -170,7 +170,7 @@ def delete_for_ide(org_id: str, user_id: str, tool_id: str, file_name: str) -> b
def _find_files(
fs: FileStorage, base_file_name: str, base_path: str, directories: list[str]
) -> list[str]:
""" This method is used to file files with the specific pattern
"""This method is used to file files with the specific pattern
determined using the list of directories passed and the base path.
This is used to delete related(extract, metadata etc.) files generated
for a specific prompt studio project."""
Expand Down

0 comments on commit eb412f4

Please sign in to comment.