Refs #34233 -- Used types.NoneType.

Available since Python 3.10 where it was reintroduced.
This commit is contained in:
Nick Pope 2023-01-18 16:27:23 +00:00 committed by GitHub
parent 26a395f27d
commit fd21f82aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 25 additions and 15 deletions

View file

@ -4,6 +4,7 @@ import functools
import inspect
from collections import defaultdict
from decimal import Decimal
from types import NoneType
from uuid import UUID
from django.core.exceptions import EmptyResultSet, FieldError, FullResultSet
@ -506,7 +507,6 @@ class Expression(BaseExpression, Combinable):
# The current approach for NULL is based on lowest common denominator behavior
# i.e. if one of the supported databases is raising an error (rather than
# return NULL) for `val <op> NULL`, then Django raises FieldError.
NoneType = type(None)
_connector_combinations = [
# Numeric operations - operands of same type.