mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-31 20:15:44 +00:00
Chore: Import dateparser lazily so processes that never parse dates skip it
This commit is contained in:
1 parent
e240c89f27
commit
28f54bb592
6 files changed
+16
-11
No files matched your search
@@ -7,8 +7,6 @@ from dataclasses import dataclass
|
||||
from types import TracebackType
|
||||
from typing import Self
|
||||
|
||||
import dateparser
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -80,6 +78,8 @@ class DateParserPluginBase(ABC):
|
||||
|
||||
Uses configuration from `self.config`.
|
||||
"""
|
||||
import dateparser
|
||||
|
||||
try:
|
||||
return dateparser.parse(
|
||||
date_string,
|
||||
|
||||
Reference in new issue
Block a user