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 0ddd1ab commit 3451ca8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/drf_yasg/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import logging
import re
import urllib.parse as urlparse
from collections import OrderedDict
from collections import abc as collections_abc
from collections import OrderedDict, abc as collections_abc

from django.urls import get_script_prefix
from django.utils.functional import Promise
Expand Down Expand Up @@ -89,7 +88,7 @@ class SwaggerDict(OrderedDict):
def __init__(self, **attrs):
super(SwaggerDict, self).__init__()
self._extras__ = attrs
if isinstance(self, SwaggerDict):
if type(self) == SwaggerDict:
self._insert_extras__()

def __setattr__(self, key, value):
Expand Down Expand Up @@ -517,7 +516,7 @@ def __init__(self, resolver, name, scope, expected_type, ignore_unresolved=False
:param bool ignore_unresolved: do not throw if the referenced object does not exist
"""
super(_Ref, self).__init__()
assert type(self) != _Ref, "do not instantiate _Ref directly" # noqa: E721
assert not type(self) == _Ref, "do not instantiate _Ref directly"
ref_name = "#/{scope}/{name}".format(scope=scope, name=name)
if not ignore_unresolved:
obj = resolver.get(name, scope)
Expand Down

0 comments on commit 3451ca8

Please sign in to comment.