Skip to content

Commit

Permalink
requirements/lint.txt: ruff>=0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Oct 19, 2024
1 parent b294b72 commit 5441d95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ lint.select = [
]
lint.isort.known-first-party = [ "drf_yasg", "testproj", "articles", "people", "snippets", "todo", "users", "urlconfs" ]
lint.mccabe.max-complexity = 13
lint.per-file-ignores."src/drf_yasg/inspectors/field.py" = [ "E721" ]
lint.per-file-ignores."src/drf_yasg/openapi.py" = [ "E721" ]
lint.per-file-ignores."testproj/testproj/settings/*" = [ "F405" ]

[tool.setuptools_scm]
10 changes: 4 additions & 6 deletions src/drf_yasg/inspectors/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@
import inspect
import logging
import operator
import typing
import uuid
from contextlib import suppress
from collections import OrderedDict
from contextlib import suppress
from decimal import Decimal
from inspect import signature as inspect_signature

import typing
from django.core import validators
from django.db import models
from packaging import version
from rest_framework import serializers
from rest_framework.settings import api_settings as rest_framework_settings

from .base import call_view_method, FieldInspector, NotHandled, SerializerInspector
from .. import openapi
from ..errors import SwaggerGenerationError
from ..utils import (
decimal_as_float, field_value_to_representation, filter_none, get_serializer_class, get_serializer_ref_name
)
from ..utils import decimal_as_float, field_value_to_representation, filter_none, get_serializer_class, get_serializer_ref_name
from .base import FieldInspector, NotHandled, SerializerInspector, call_view_method

try:
from importlib import metadata
Expand Down
3 changes: 2 additions & 1 deletion src/drf_yasg/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import logging
import re
import urllib.parse as urlparse
from collections import OrderedDict, abc as collections_abc
from collections import OrderedDict
from collections import abc as collections_abc

from django.urls import get_script_prefix
from django.utils.functional import Promise
Expand Down

0 comments on commit 5441d95

Please sign in to comment.