Skip to content

Commit

Permalink
style(pre-commit): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
shinybrar committed Feb 4, 2024
1 parent d8f6802 commit bb38414
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions workflow/lifecycle/archive/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Archive lifecycle module."""

from datetime import datetime
from pathlib import Path
from typing import Any, Dict
Expand Down
1 change: 1 addition & 0 deletions workflow/lifecycle/archive/http.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""HTTP archive functions."""

from pathlib import Path
from typing import List, Optional

Expand Down
1 change: 1 addition & 0 deletions workflow/lifecycle/archive/posix.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""POSIX archive functions."""

import os
import shutil
import subprocess
Expand Down
13 changes: 7 additions & 6 deletions workflow/lifecycle/archive/s3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""S3 archive functions."""

import os
from pathlib import Path
from typing import List, Optional
Expand Down Expand Up @@ -67,9 +68,9 @@ def copy(path: Path, payload: Optional[List[str]]) -> bool:
file_path=item,
)
# Update payload with new path
payload[
index
] = f"s3://{os.getenv('WORKFLOW_S3_ENDPOINT')}/workflow/{'/'.join([object_paths, item.split('/')[-1]])}" # noqa: E501
payload[index] = (
f"s3://{os.getenv('WORKFLOW_S3_ENDPOINT')}/workflow/{'/'.join([object_paths, item.split('/')[-1]])}" # noqa: E501
)
log.info("Move complete ✅")
return True
except Exception as error:
Expand Down Expand Up @@ -119,9 +120,9 @@ def move(path: Path, payload: Optional[List[str]]) -> bool:
file_path=item,
)
# Update payload with new path
payload[
index
] = f"s3://{os.getenv('WORKFLOW_S3_ENDPOINT')}/workflow/{'/'.join([object_paths, item.split('/')[-1]])}" # noqa: E501
payload[index] = (
f"s3://{os.getenv('WORKFLOW_S3_ENDPOINT')}/workflow/{'/'.join([object_paths, item.split('/')[-1]])}" # noqa: E501
)
# Delete file
os.remove(item)
log.info("Move complete ✅")
Expand Down

0 comments on commit bb38414

Please sign in to comment.