mitigate global dependency on inflection #8017 (#8781)

This commit is contained in:
T. Franzel 2022-11-28 04:11:10 +01:00 committed by GitHub
parent 3bf611787a
commit 5435b2c9f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,6 @@ from django.core.validators import (
)
from django.db import models
from django.utils.encoding import force_str
from inflection import pluralize
from rest_framework import (
RemovedInDRF315Warning, exceptions, renderers, serializers
@ -249,6 +248,8 @@ class AutoSchema(ViewInspector):
name = name[:-len(action)]
if action == 'list':
from inflection import pluralize
name = pluralize(name)
return name