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:
Alexandre Detiste 2024-09-15 16:50:15 +02:00 committed by GitHub
parent 28c71c58f7
commit 269225085d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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