From 6f7800f6fd9db603758f12acc7f4c9ba12a5a8f5 Mon Sep 17 00:00:00 2001 From: "T. Franzel" <13507857+tfranzel@users.noreply.github.com> Date: Thu, 12 Mar 2020 16:25:07 +0100 Subject: [PATCH] fix ABC warning --- drf_spectacular/plumbing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drf_spectacular/plumbing.py b/drf_spectacular/plumbing.py index d8ae4d8c..6d632eb3 100644 --- a/drf_spectacular/plumbing.py +++ b/drf_spectacular/plumbing.py @@ -1,6 +1,6 @@ -import collections import inspect import sys +from collections.abc import Hashable from django import __version__ as DJANGO_VERSION from rest_framework import fields, serializers @@ -40,7 +40,7 @@ def is_field(obj): def is_basic_type(obj): - if not isinstance(obj, collections.Hashable): + if not isinstance(obj, Hashable): return False return obj in OPENAPI_TYPE_MAPPING or obj in PYTHON_TYPE_MAPPING