Skip to content

Commit

Permalink
style: formatted using black
Browse files Browse the repository at this point in the history
  • Loading branch information
guidodinello committed Dec 18, 2024
1 parent 8346633 commit 5468525
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/claudesync/cli/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,11 @@ def ls(config, show_all):
status = " (Archived)" if project.get("archived_at") else ""
click.echo(f" - {project['name']} (ID: {project['id']}){status}")


@project.command()
@click.option("-a", "--include-archived", is_flag=True, help="Include archived projects")
@click.option(
"-a", "--include-archived", is_flag=True, help="Include archived projects"
)
@click.option("--all", "truncate_all", is_flag=True, help="Truncate all projects")
@click.option("-y", "--yes", is_flag=True, help="Skip confirmation prompt")
@click.pass_obj
Expand All @@ -287,7 +290,9 @@ def truncate(config, include_archived, truncate_all, yes):
provider = validate_and_get_provider(config)
active_organization_id = config.get("active_organization_id")

projects = provider.get_projects(active_organization_id, include_archived=include_archived)
projects = provider.get_projects(
active_organization_id, include_archived=include_archived
)

if not projects:
click.echo("No projects found.")
Expand All @@ -299,7 +304,9 @@ def truncate(config, include_archived, truncate_all, yes):
for project in projects:
status = " (Archived)" if project.get("archived_at") else ""
click.echo(f" - {project['name']} (ID: {project['id']}){status}")
if not click.confirm("Are you sure you want to continue? This may take some time."):
if not click.confirm(
"Are you sure you want to continue? This may take some time."
):
click.echo("Operation cancelled.")
return

Expand Down Expand Up @@ -328,12 +335,15 @@ def truncate(config, include_archived, truncate_all, yes):
provider,
active_organization_id,
selected_project["id"],
selected_project["name"]
selected_project["name"],
)
click.echo(
f"All files have been deleted from project '{selected_project['name']}'."
)
click.echo(f"All files have been deleted from project '{selected_project['name']}'.")
else:
click.echo("Invalid selection. Please try again.")


@retry_on_403()
def delete_files_from_project(provider, organization_id, project_id, project_name):
try:
Expand Down

0 comments on commit 5468525

Please sign in to comment.