@@ -29,16 +29,20 @@ class Config:
29
29
30
30
@validator ("bbox" , pre = True )
31
31
def check_bbox (cls , bbox : BBox ) -> BBox :
32
+ """Check that bbox is valid."""
32
33
if len (bbox ) == 6 :
33
- if bbox [0 ] > bbox [3 ] or bbox [1 ] > bbox [4 ] or bbox [2 ] > bbox [5 ]:
34
- raise ValueError ("BBox must be in the form [west, south, bottom, east, north, top]" )
34
+ if bbox [0 ] > bbox [3 ] or bbox [1 ] > bbox [4 ] or bbox [2 ] > bbox [5 ]: # type: ignore
35
+ raise ValueError (
36
+ "BBox must be in the form [west, south, bottom, east, north, top]"
37
+ )
35
38
elif len (bbox ) == 4 :
36
39
if bbox [0 ] > bbox [2 ] or bbox [1 ] > bbox [3 ]:
37
40
raise ValueError ("BBox must be in the form [west, south, east, north]" )
38
41
else :
39
- raise ValueError ("BBox must be in the form [west, south, east, north] or [west, south, bottom, east, north, top]" )
40
- return bbox
41
-
42
+ raise ValueError (
43
+ "BBox must be in the form [west, south, east, north] or [west, south, bottom, east, north, top]"
44
+ )
45
+ return bbox
42
46
43
47
@validator ("geometry" , pre = True , always = True )
44
48
def set_geometry (cls , geometry : Any ) -> Any :
0 commit comments