rasterio.coords.BoundingBox: fix attribute docs (#3351)

* rasterio.coords.BoundingBox: fix attribute docs

* Add comment
This commit is contained in:
Adam J. Stewart 2025-09-07 03:49:29 +02:00 committed by GitHub
parent e2b32df87e
commit b82c6a346d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,24 +3,19 @@
from collections import namedtuple
BoundingBox = namedtuple('BoundingBox', ('left', 'bottom', 'right', 'top'))
# Required to properly document this namedtuple and its attributes
BoundingBox.__doc__ = \
"""Bounding box named tuple, defining extent in cartesian coordinates.
.. code::
BoundingBox(left, bottom, right, top)
Attributes
----------
left :
Left coordinate
bottom :
Bottom coordinate
right :
Right coordinate
top :
Top coordinate
"""
BoundingBox.left.__doc__ = "Left coordinate"
BoundingBox.bottom.__doc__ = "Bottom coordinate"
BoundingBox.right.__doc__ = "Right coordinate"
BoundingBox.top.__doc__ = "Top coordinate"
def disjoint_bounds(bounds1, bounds2):
"""Compare two bounds and determine if they are disjoint.