Fix deprecated datetime.utcnow() and test assertion for clean_text

This commit is contained in:
n0mad1k
2026-03-19 08:56:08 -04:00
parent c79f81d9c6
commit 0cfd7dc32d
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
import json
import logging
from abc import ABC, abstractmethod
from datetime import datetime
import datetime
from typing import Optional
import anthropic
@@ -130,7 +130,7 @@ class BaseExtractor(ABC):
# Log token usage
self.db.log_token_usage(TokenUsage(
timestamp=datetime.utcnow().isoformat(),
timestamp=datetime.datetime.now(datetime.timezone.utc).isoformat(),
source=source,
doc_id=doc_id,
extractor=self.EXTRACTOR_NAME,