@@ -238,24 +238,7 @@ def __len__(self) -> int:
238238 return self ._bitlength
239239
240240
241- if typing .TYPE_CHECKING or sys .version_info >= (3 , 6 ):
242- _PointBase = typing .Tuple [float , float ]
243- _BoxBase = typing .Tuple ['Point' , 'Point' ]
244- _LineBase = typing .Tuple [float , float , float ]
245- _LineSegmentBase = typing .Tuple ['Point' , 'Point' ]
246- _CircleBase = typing .Tuple ['Point' , float ]
247- else :
248- # In Python 3.5, subclassing from typing.Tuple does not make the
249- # subclass act like a tuple in certain situations (like starred
250- # expressions)
251- _PointBase = tuple
252- _BoxBase = tuple
253- _LineBase = tuple
254- _LineSegmentBase = tuple
255- _CircleBase = tuple
256-
257-
258- class Point (_PointBase ):
241+ class Point (typing .Tuple [float , float ]):
259242 """Immutable representation of PostgreSQL `point` type."""
260243
261244 __slots__ = ()
@@ -290,7 +273,7 @@ def y(self) -> float:
290273 return self [1 ]
291274
292275
293- class Box (_BoxBase ):
276+ class Box (typing . Tuple [ Point , Point ] ):
294277 """Immutable representation of PostgreSQL `box` type."""
295278
296279 __slots__ = ()
@@ -317,7 +300,7 @@ def low(self) -> Point:
317300 return self [1 ]
318301
319302
320- class Line (_LineBase ):
303+ class Line (typing . Tuple [ float , float , float ] ):
321304 """Immutable representation of PostgreSQL `line` type."""
322305
323306 __slots__ = ()
@@ -338,7 +321,7 @@ def C(self) -> float:
338321 return self [2 ]
339322
340323
341- class LineSegment (_LineSegmentBase ):
324+ class LineSegment (typing . Tuple [ Point , Point ] ):
342325 """Immutable representation of PostgreSQL `lseg` type."""
343326
344327 __slots__ = ()
@@ -421,7 +404,7 @@ def __init__(self, *points: typing.Sequence[float]) -> None:
421404 super ().__init__ (* points , is_closed = True )
422405
423406
424- class Circle (_CircleBase ):
407+ class Circle (typing . Tuple [ Point , float ] ):
425408 """Immutable representation of PostgreSQL `circle` type."""
426409
427410 __slots__ = ()
0 commit comments