misc: silence pylint warning (#72942)

@logit
    def head(self, request, partner_name, cut_uuid, petal_name):

    -> pylint: An attribute defined in django.views.generic.base line 85 hides this method

It comes from some conditional code in the base View class:

    class View:
    ...
	    def setup(self, request, *args, **kwargs):
		"""Initialize attributes shared by all view methods."""
		if hasattr(self, 'get') and not hasattr(self, 'head'):
		    self.head = self.get
This commit is contained in:
Benjamin Dauvergne 2023-01-10 19:18:41 +01:00
parent 972ce33d5d
commit fe2b44ab29
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ class PetalAPIView(APIView):
return petal
@logit
def head(self, request, partner_name, cut_uuid, petal_name):
def head(self, request, partner_name, cut_uuid, petal_name): # pylint: disable=method-hidden
petal = self.get_petal(partner_name, cut_uuid, petal_name)
response = HttpResponse(content_type=petal.content_type)
response['Content-Length'] = petal.size