mirror of
https://github.com/django/django.git
synced 2025-09-09 20:16:32 +00:00
Refs #34233 -- Used types.NoneType.
Available since Python 3.10 where it was reintroduced.
This commit is contained in:
parent
26a395f27d
commit
fd21f82aa8
9 changed files with 25 additions and 15 deletions
|
@ -28,6 +28,7 @@
|
|||
"""
|
||||
from ctypes import byref, c_char_p, c_int
|
||||
from enum import IntEnum
|
||||
from types import NoneType
|
||||
|
||||
from django.contrib.gis.gdal.base import GDALBase
|
||||
from django.contrib.gis.gdal.error import SRSException
|
||||
|
@ -57,7 +58,7 @@ class SpatialReference(GDALBase):
|
|||
EPSG code, a PROJ string, and/or a projection "well known" shorthand
|
||||
string (one of 'WGS84', 'WGS72', 'NAD27', 'NAD83').
|
||||
"""
|
||||
if not isinstance(axis_order, (type(None), AxisOrder)):
|
||||
if not isinstance(axis_order, (NoneType, AxisOrder)):
|
||||
raise ValueError(
|
||||
"SpatialReference.axis_order must be an AxisOrder instance."
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue