Skip to content

Commit 5435b2c

Browse files
authored
mitigate global dependency on inflection #8017 (#8781)
1 parent 3bf6117 commit 5435b2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_framework/schemas/openapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
)
1212
from django.db import models
1313
from django.utils.encoding import force_str
14-
from inflection import pluralize
1514

1615
from rest_framework import (
1716
RemovedInDRF315Warning, exceptions, renderers, serializers
@@ -249,6 +248,8 @@ def get_operation_id_base(self, path, method, action):
249248
name = name[:-len(action)]
250249

251250
if action == 'list':
251+
from inflection import pluralize
252+
252253
name = pluralize(name)
253254

254255
return name

0 commit comments

Comments
 (0)