diff options
author | Nick Pope <nick@nickpope.me.uk> | 2023-01-18 16:27:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 17:27:23 +0100 |
commit | fd21f82aa82b0d75a161f618ef944ebe0923e0ab (patch) | |
tree | 7ca34bc34988e10427c99c7772b88238d28afd9f /django/utils/encoding.py | |
parent | 26a395f27d86bbf65f330851c8136c33694ac867 (diff) | |
download | django-fd21f82aa82b0d75a161f618ef944ebe0923e0ab.tar.gz |
Refs #34233 -- Used types.NoneType.
Available since Python 3.10 where it was reintroduced.
Diffstat (limited to 'django/utils/encoding.py')
-rw-r--r-- | django/utils/encoding.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/utils/encoding.py b/django/utils/encoding.py index 43847b5385..5b618e74a3 100644 --- a/django/utils/encoding.py +++ b/django/utils/encoding.py @@ -2,6 +2,7 @@ import codecs import datetime import locale from decimal import Decimal +from types import NoneType from urllib.parse import quote from django.utils.functional import Promise @@ -34,7 +35,7 @@ def smart_str(s, encoding="utf-8", strings_only=False, errors="strict"): _PROTECTED_TYPES = ( - type(None), + NoneType, int, float, Decimal, |