Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use_given_order for languages too #997

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions dateparser/date.py
Expand Up @@ -358,8 +358,8 @@ def __init__(self, languages=None, locales=None, region=None, try_previous_local
raise TypeError("use_given_order argument must be a boolean (%r given)"
% type(use_given_order))

if not locales and use_given_order:
raise ValueError("locales must be given if use_given_order is True")
if not locales and not languages and use_given_order:
raise ValueError("locales or locales must be given if use_given_order is True")
whalebot-helmsman marked this conversation as resolved.
Show resolved Hide resolved

check_settings(settings)

Expand Down