Skip to content

Commit 9d28c88

Browse files
committed
Add DateTime to possible return types of parse()
1 parent 1b1784f commit 9d28c88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pendulum/parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pendulum
77

88
from .date import Date
9+
from .datetime import DateTime
910
from .parsing import _Interval
1011
from .parsing import parse as base_parse
1112
from .time import Duration
@@ -21,7 +22,7 @@
2122

2223
def parse(
2324
text, **options
24-
): # type: (str, **typing.Any) -> typing.Union[Date, Time, Duration]
25+
): # type: (str, **typing.Any) -> typing.Union[Date, Time, DateTime, Duration]
2526
# Use the mock now value if it exists
2627
options["now"] = options.get("now", pendulum.get_test_now())
2728

0 commit comments

Comments
 (0)