@@ -1802,9 +1802,7 @@ def _type_check_params(param_dict: dict[str, Any], element_type: str) -> dict[st
18021802 if (norm := param_dict .get ("norm" )) is not None :
18031803 if element_type in {"images" , "labels" } and not isinstance (norm , Normalize ):
18041804 raise TypeError ("Parameter 'norm' must be of type Normalize." )
1805- if element_type in {"shapes" , "points" } and not isinstance (
1806- norm , bool | Normalize
1807- ):
1805+ if element_type in {"shapes" , "points" } and not isinstance (norm , bool | Normalize ):
18081806 raise TypeError ("Parameter 'norm' must be a boolean or a mpl.Normalize." )
18091807
18101808 if (scale := param_dict .get ("scale" )) is not None :
@@ -1823,15 +1821,11 @@ def _type_check_params(param_dict: dict[str, Any], element_type: str) -> dict[st
18231821 raise ValueError ("Parameter 'size' must be a positive number." )
18241822
18251823 if element_type == "shapes" and (shape := param_dict .get ("shape" )) is not None :
1826- valid_shapes = {"circle" , "hex" , "visium_hex" , "square" }
1824+ valid_shapes = {"circle" , "hex" , "visium_hex" , "square" }
18271825 if not isinstance (shape , str ):
1828- raise TypeError (
1829- f"Parameter 'shape' must be a String from { valid_shapes } if not None."
1830- )
1826+ raise TypeError (f"Parameter 'shape' must be a String from { valid_shapes } if not None." )
18311827 if shape not in valid_shapes :
1832- raise ValueError (
1833- f"'{ shape } ' is not supported for 'shape', please choose from { valid_shapes } ."
1834- )
1828+ raise ValueError (f"'{ shape } ' is not supported for 'shape', please choose from { valid_shapes } ." )
18351829
18361830 table_name = param_dict .get ("table_name" )
18371831 table_layer = param_dict .get ("table_layer" )
0 commit comments