make raise_exception keyword-only in metaclass

This commit is contained in:
Max 2021-04-25 22:51:42 +03:00
parent edbb7a4c8f
commit 52f3c770df

View File

@ -712,7 +712,7 @@ class ListSerializer(BaseSerializer):
return self.instance
def is_valid(self, raise_exception=False):
def is_valid(self, *, raise_exception=False):
# This implementation is the same as the default,
# except that we use lists, rather than dicts, as the empty case.
assert hasattr(self, 'initial_data'), (