mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-21 17:16:56 +03:00
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
This commit is contained in:
parent
28c71c58f7
commit
269225085d
|
@ -111,24 +111,7 @@ def is_valid_django_model(model):
|
||||||
|
|
||||||
|
|
||||||
def import_single_dispatch():
|
def import_single_dispatch():
|
||||||
try:
|
from functools import singledispatch
|
||||||
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"
|
|
||||||
)
|
|
||||||
|
|
||||||
return singledispatch
|
return singledispatch
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user