From d46506cc32f9d35620f2e1e94e816dae2a833a2a Mon Sep 17 00:00:00 2001 From: Fazliddin Abdurahimov Date: Thu, 7 Aug 2025 09:35:12 +0500 Subject: [PATCH] fix: COMMENT rules fix --- core/apps/companies/views/accounts.py | 6 +++--- core/apps/companies/views/companies.py | 3 --- docs/COMMENTS.md | 3 ++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/core/apps/companies/views/accounts.py b/core/apps/companies/views/accounts.py index 3b62a2d..7d5c274 100644 --- a/core/apps/companies/views/accounts.py +++ b/core/apps/companies/views/accounts.py @@ -12,9 +12,9 @@ from core.apps.companies.serializers.accounts import ( DestroyCompanyAccountSerializer, ) -###################################################################### -# Crud -###################################################################### +################################################################################### +# @view-set | POST, GET, UPDATE, DELETE, PATCH, PUT - +################################################################################### @extend_schema(tags=["CompanyAccount"]) class CompanyAccountCrudViewSet(BaseViewSetMixin, ModelViewSet): queryset = CompanyAccountModel.objects.all() diff --git a/core/apps/companies/views/companies.py b/core/apps/companies/views/companies.py index c2fbccb..4a067ac 100644 --- a/core/apps/companies/views/companies.py +++ b/core/apps/companies/views/companies.py @@ -3,7 +3,6 @@ from django.contrib.auth import get_user_model from drf_spectacular.utils import extend_schema -from rest_framework.decorators import action # type: ignore from rest_framework.permissions import AllowAny, IsAdminUser # type: ignore from rest_framework.viewsets import ModelViewSet # type: ignore from rest_framework.generics import GenericAPIView # type: ignore @@ -26,12 +25,10 @@ from core.apps.companies.serializers import ( RetrieveCompanyFolderSerializer, CreateFolderForCompanySerializer, ) - from core.apps.contracts.serializers import ( RetrieveContractSerializer, BaseContractSerializer, ) - from core.apps.contracts.models import ContractModel diff --git a/docs/COMMENTS.md b/docs/COMMENTS.md index 68174a6..d7495f1 100644 --- a/docs/COMMENTS.md +++ b/docs/COMMENTS.md @@ -61,7 +61,8 @@ List only the HTTP methods the view explicitly supports: * `OPTIONS` Order doesn't matter, but use **uppercase** for consistency. - +Write `ALL` instead of counting one by one, if your endpoint handles +all of the supported methods. --- ### 📍 Endpoint Path