The SingleOperandHolder is unnecessary #7914
Unanswered
ariel-m-s
asked this question in
Ideas & Suggestions
Replies: 1 comment
-
So, at this point in the project lifespan we're very much tending towards not introducing any code changes unless clearly necessary, since they always come with potentially unexpected risks. I'm not necessarily against this, if the pull request looked super obviously sensible, but. 🤷♂️ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the permissions module defines two
OperandHolder
s, which I think is unnecessary.django-rest-framework/rest_framework/permissions.py
Lines 11 to 47 in fd017d0
The
SingleOperandHolder
is only used for the negation operation (NOT
). Instead, this could be implemented with a single class that works for all operations. I believe this implementation improves redability.Beta Was this translation helpful? Give feedback.
All reactions