Refactor: modify the codebase to pass through the pre-commit hooks

This commit is contained in:
tgoddessana 2025-03-21 19:06:47 +09:00
parent 6dc9b44fdb
commit 1602403d2f
3 changed files with 5 additions and 21 deletions

View File

@ -3,7 +3,6 @@ Provides generic filtering backends that can be used to filter the results
returned by list views. returned by list views.
""" """
import operator import operator
import warnings
from functools import reduce from functools import reduce
from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured
@ -14,8 +13,6 @@ from django.utils.encoding import force_str
from django.utils.text import smart_split, unescape_string_literal from django.utils.text import smart_split, unescape_string_literal
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework import RemovedInDRF317Warning
from rest_framework.compat import coreapi, coreschema
from rest_framework.fields import CharField from rest_framework.fields import CharField
from rest_framework.settings import api_settings from rest_framework.settings import api_settings

View File

@ -4,7 +4,6 @@ be used for paginated responses.
""" """
import contextlib import contextlib
import warnings
from base64 import b64decode, b64encode from base64 import b64decode, b64encode
from collections import namedtuple from collections import namedtuple
from urllib import parse from urllib import parse
@ -15,8 +14,6 @@ from django.template import loader
from django.utils.encoding import force_str from django.utils.encoding import force_str
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework import RemovedInDRF317Warning
from rest_framework.compat import coreapi, coreschema
from rest_framework.exceptions import NotFound from rest_framework.exceptions import NotFound
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.settings import api_settings from rest_framework.settings import api_settings

View File

@ -1,17 +1,10 @@
import warnings
from collections import Counter from collections import Counter
from urllib import parse
from django.db import models from django.db import models
from django.utils.encoding import force_str from django.utils.encoding import force_str
from rest_framework import RemovedInDRF317Warning, exceptions, serializers from rest_framework import serializers
from rest_framework.compat import coreapi, coreschema, uritemplate from rest_framework.compat import coreschema
from rest_framework.settings import api_settings
from .generators import BaseSchemaGenerator
from .inspectors import ViewInspector
from .utils import get_pk_description, is_list_view
def common_path(paths): def common_path(paths):
@ -186,6 +179,3 @@ def field_to_schema(field):
) )
return coreschema.String(title=title, description=description) return coreschema.String(title=title, description=description)
å