diff --git a/pendulum/parser.py b/pendulum/parser.py index 3d2cc841..c8f5fe04 100644 --- a/pendulum/parser.py +++ b/pendulum/parser.py @@ -5,8 +5,11 @@ import pendulum +from .date import Date from .parsing import _Interval from .parsing import parse as base_parse +from .time import Duration +from .time import Time from .tz import UTC @@ -16,7 +19,9 @@ CDuration = None -def parse(text, **options): # type: (str, **typing.Any) -> str +def parse( + text, **options +): # type: (str, **typing.Any) -> typing.Union[Date, Time, Duration] # Use the mock now value if it exists options["now"] = options.get("now", pendulum.get_test_now())