diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-03 11:20:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-03 11:20:46 +0100 |
| commit | c5cd8783825b5f6384417dac5f3889b4210b7d08 (patch) | |
| tree | 3d4689aaa0e209e40d2d8df09edad7e155960b45 /django/forms | |
| parent | c9d6e3595cfd0aa58cde1656bd735ecfcd7a872b (diff) | |
Refs #33476 -- Refactored problematic code before reformatting by Black.
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/models.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/django/forms/models.py b/django/forms/models.py index c82aaf12e1..19a5cb142a 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -1218,8 +1218,9 @@ class ModelChoiceField(ChoiceField): # This class is a subclass of ChoiceField for purity, but it doesn't # actually use any of ChoiceField's implementation. default_error_messages = { - 'invalid_choice': _('Select a valid choice. That choice is not one of' - ' the available choices.'), + 'invalid_choice': _( + 'Select a valid choice. That choice is not one of the available choices.' + ), } iterator = ModelChoiceIterator @@ -1338,8 +1339,9 @@ class ModelMultipleChoiceField(ModelChoiceField): hidden_widget = MultipleHiddenInput default_error_messages = { 'invalid_list': _('Enter a list of values.'), - 'invalid_choice': _('Select a valid choice. %(value)s is not one of the' - ' available choices.'), + 'invalid_choice': _( + 'Select a valid choice. %(value)s is not one of the available choices.' + ), 'invalid_pk_value': _('ā%(pk)sā is not a valid value.') } |
