Skip to content

Commit

Permalink
only import dateparser when required
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaswinkler committed Feb 15, 2021
1 parent c330cca commit 416101d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/documents/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import subprocess
import tempfile

import dateparser
import magic
from django.conf import settings
from django.utils import timezone
Expand Down Expand Up @@ -200,6 +199,8 @@ def __parser(ds, date_order):
"""
Call dateparser.parse with a particular date ordering
"""
import dateparser

return dateparser.parse(
ds,
settings={
Expand Down

0 comments on commit 416101d

Please sign in to comment.