Skip to content

Commit

Permalink
mitigate global dependency on inflection #8017 (#8781)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfranzel authored Nov 28, 2022
1 parent 3bf6117 commit 5435b2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rest_framework/schemas/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
)
from django.db import models
from django.utils.encoding import force_str
from inflection import pluralize

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

if action == 'list':
from inflection import pluralize

name = pluralize(name)

return name
Expand Down

0 comments on commit 5435b2c

Please sign in to comment.