Fix deprecated datetime.utcnow() and test assertion for clean_text
This commit is contained in:
@@ -3,7 +3,7 @@ import json
|
||||
import hashlib
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
import datetime
|
||||
from typing import Optional
|
||||
|
||||
from .db import MosaicDB
|
||||
@@ -45,7 +45,7 @@ class JSONLStore:
|
||||
logger.info("No data for category: %s", cat)
|
||||
continue
|
||||
|
||||
timestamp = datetime.utcnow().strftime("%Y%m%d_%H%M%S")
|
||||
timestamp = datetime.datetime.now(datetime.timezone.utc).strftime("%Y%m%d_%H%M%S")
|
||||
filename = f"{cat}_{timestamp}.jsonl"
|
||||
filepath = self.output_dir / filename
|
||||
|
||||
|
||||
Reference in New Issue
Block a user