mirror of
https://github.com/Sea-Haven-Industries/procurement-ingest.git
synced 2026-10-07 16:08:54 +00:00
Fix f-string lint and formatting in backfill scripts
Drop the f prefix from two f-strings that carry no placeholders (F541) and apply ruff format, so `ruff check` / `ruff format --check` pass in CI.
This commit is contained in:
parent
bb4d0710e8
commit
aa490f9b33
2 changed files with 10 additions and 4 deletions
|
|
@ -8,7 +8,9 @@ Usage:
|
|||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lambdas", "po", "site_extractor"))
|
||||
sys.path.insert(
|
||||
0, os.path.join(os.path.dirname(__file__), "..", "lambdas", "po", "site_extractor")
|
||||
)
|
||||
|
||||
import boto3
|
||||
from handler import extract_site_code, parse_address, upsert_site
|
||||
|
|
@ -65,7 +67,7 @@ def main():
|
|||
if extracted % 100 == 0:
|
||||
print(f" Processed {extracted} POs with site codes...")
|
||||
|
||||
print(f"\nBackfill complete:")
|
||||
print("\nBackfill complete:")
|
||||
print(f" Total POs scanned: {len(pos)}")
|
||||
print(f" POs with site code: {extracted}")
|
||||
print(f" POs without site code: {skipped}")
|
||||
|
|
|
|||
|
|
@ -48,7 +48,11 @@ def build_s3_event(bucket: str, key: str) -> dict:
|
|||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Reprocess missed PO emails")
|
||||
parser.add_argument("--execute", action="store_true", help="Actually invoke the Lambda (default is dry-run)")
|
||||
parser.add_argument(
|
||||
"--execute",
|
||||
action="store_true",
|
||||
help="Actually invoke the Lambda (default is dry-run)",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
bucket = get_bucket_name()
|
||||
|
|
@ -73,7 +77,7 @@ def main():
|
|||
print(f" [dry-run] {key}")
|
||||
|
||||
if not args.execute:
|
||||
print(f"\nDry run complete. Re-run with --execute to invoke the Lambda.")
|
||||
print("\nDry run complete. Re-run with --execute to invoke the Lambda.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue