@@ -305,7 +305,6 @@ def _get_centroid_of_pathpatch(pathpatch: mpatches.PathPatch) -> tuple[float, fl
305305
306306
307307def _scale_pathpatch_around_centroid (pathpatch : mpatches .PathPatch , scale_factor : float ) -> None :
308-
309308 centroid = _get_centroid_of_pathpatch (pathpatch )
310309 vertices = pathpatch .get_path ().vertices
311310 scaled_vertices = np .array ([centroid + (vertex - centroid ) * scale_factor for vertex in vertices ])
@@ -677,7 +676,7 @@ def _get_colors_for_categorical_obs(
677676 palette = default_102
678677 else :
679678 palette = ["grey" for _ in range (len_cat )]
680- logger .info ("input has more than 103 categories. Uniform " " 'grey' color will be used for all categories." )
679+ logger .info ("input has more than 103 categories. Uniform 'grey' color will be used for all categories." )
681680 else :
682681 # raise error when user didn't provide the right number of colors in palette
683682 if isinstance (palette , list ) and len (palette ) != len (categories ):
@@ -1654,7 +1653,7 @@ def _ensure_table_and_layer_exist_in_sdata(
16541653 if table_layer in sdata .tables [tname ].layers :
16551654 if found_table :
16561655 raise ValueError (
1657- "Trying to guess 'table_name' based on 'table_layer', " " but found multiple matches."
1656+ "Trying to guess 'table_name' based on 'table_layer', but found multiple matches."
16581657 )
16591658 found_table = True
16601659
@@ -1727,7 +1726,6 @@ def _validate_label_render_params(
17271726
17281727 element_params : dict [str , dict [str , Any ]] = {}
17291728 for el in param_dict ["element" ]:
1730-
17311729 # ensure that the element exists in the SpatialData object
17321730 _ = param_dict ["sdata" ][el ]
17331731
@@ -1788,7 +1786,6 @@ def _validate_points_render_params(
17881786
17891787 element_params : dict [str , dict [str , Any ]] = {}
17901788 for el in param_dict ["element" ]:
1791-
17921789 # ensure that the element exists in the SpatialData object
17931790 _ = param_dict ["sdata" ][el ]
17941791
@@ -1859,7 +1856,6 @@ def _validate_shape_render_params(
18591856
18601857 element_params : dict [str , dict [str , Any ]] = {}
18611858 for el in param_dict ["element" ]:
1862-
18631859 # ensure that the element exists in the SpatialData object
18641860 _ = param_dict ["sdata" ][el ]
18651861
@@ -1896,7 +1892,6 @@ def _validate_shape_render_params(
18961892def _validate_col_for_column_table (
18971893 sdata : SpatialData , element_name : str , col_for_color : str | None , table_name : str | None , labels : bool = False
18981894) -> tuple [str | None , str | None ]:
1899-
19001895 if not labels and col_for_color in sdata [element_name ].columns :
19011896 table_name = None
19021897 elif table_name is not None :
@@ -2204,7 +2199,7 @@ def _datashader_aggregate_with_function(
22042199
22052200
22062201def _datshader_get_how_kw_for_spread (
2207- reduction : Literal ["sum" , "mean" , "any" , "count" , "std" , "var" , "max" , "min" ] | None
2202+ reduction : Literal ["sum" , "mean" , "any" , "count" , "std" , "var" , "max" , "min" ] | None ,
22082203) -> str :
22092204 # Get the best input for the how argument of ds.tf.spread(), needed for numerical values
22102205 reduction = reduction or "sum"
0 commit comments