Skip to content

Commit 2692250

Browse files
authored
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
1 parent 28c71c5 commit 2692250

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

graphene_django/utils/utils.py

+1-18
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,7 @@ def is_valid_django_model(model):
111111

112112

113113
def import_single_dispatch():
114-
try:
115-
from functools import singledispatch
116-
except ImportError:
117-
singledispatch = None
118-
119-
if not singledispatch:
120-
try:
121-
from singledispatch import singledispatch
122-
except ImportError:
123-
pass
124-
125-
if not singledispatch:
126-
raise Exception(
127-
"It seems your python version does not include "
128-
"functools.singledispatch. Please install the 'singledispatch' "
129-
"package. More information here: "
130-
"https://pypi.python.org/pypi/singledispatch"
131-
)
114+
from functools import singledispatch
132115

133116
return singledispatch
134117

0 commit comments

Comments
 (0)