From 269225085dc9c4ab0be34685e52b72f7cc2c78c1 Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Sun, 15 Sep 2024 16:50:15 +0200 Subject: [PATCH] remove dead code: singledispatch has been in the standard library ... (#1534) * remove dead code: singledispatch has been in the stard library for many years (BTW this function does not seems to be used anywhere anymore) * lint --- graphene_django/utils/utils.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/graphene_django/utils/utils.py b/graphene_django/utils/utils.py index 364eff9..5f84a17 100644 --- a/graphene_django/utils/utils.py +++ b/graphene_django/utils/utils.py @@ -111,24 +111,7 @@ def is_valid_django_model(model): def import_single_dispatch(): - try: - from functools import singledispatch - except ImportError: - singledispatch = None - - if not singledispatch: - try: - from singledispatch import singledispatch - except ImportError: - pass - - if not singledispatch: - raise Exception( - "It seems your python version does not include " - "functools.singledispatch. Please install the 'singledispatch' " - "package. More information here: " - "https://pypi.python.org/pypi/singledispatch" - ) + from functools import singledispatch return singledispatch