You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an endpoint with explicitly unused request argument, Ruff triggers ARG001. One of the member asked me to open an issue in Django-Ninja to check if it's possible or not (figuratively) to make request argument optional.
For more detailed context, please, refer to the Ruff issue.
# Imports and stuff...@router.get('/', response=list[UserSchema])defget_users(request: HttpRequest) ->list[UserSchema]: # Triggers ARG001!"""Retrieve all Users..."""return [UserSchema.from_orm(user) foruserinBaseUser.objects.all()]
The text was updated successfully, but these errors were encountered:
@UnoYakshi - long story short - no - cannot make it optional - we try to be as much similar to django views where request is always passed to view function (lot of 3rd party apps/plugins/decorators depend on it)
In an endpoint with explicitly unused
request
argument, Ruff triggersARG001
. One of the member asked me to open an issue in Django-Ninja to check if it's possible or not (figuratively) to makerequest
argument optional.For more detailed context, please, refer to the Ruff issue.
The text was updated successfully, but these errors were encountered: