Skip to content

Commit

Permalink
remove dead code: singledispatch has been in the standard library ... (
Browse files Browse the repository at this point in the history
…#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
  • Loading branch information
a-detiste authored Sep 15, 2024
1 parent 28c71c5 commit 2692250
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions graphene_django/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2692250

Please sign in to comment.