@@ -134,19 +134,13 @@ def test_single_group_no_match(self) -> None:
134134 def test_multiple_groups_and_logic (self ) -> None :
135135 spec_lookup = {"s1" : {"tags" : {"plot_type" : ["scatter" ], "domain" : ["statistics" ]}}}
136136 impl_lookup = {}
137- groups = [
138- {"category" : "plot" , "values" : ["scatter" ]},
139- {"category" : "dom" , "values" : ["statistics" ]},
140- ]
137+ groups = [{"category" : "plot" , "values" : ["scatter" ]}, {"category" : "dom" , "values" : ["statistics" ]}]
141138 assert _image_matches_groups ("s1" , "matplotlib" , groups , spec_lookup , impl_lookup ) is True
142139
143140 def test_multiple_groups_one_fails (self ) -> None :
144141 spec_lookup = {"s1" : {"tags" : {"plot_type" : ["scatter" ], "domain" : ["finance" ]}}}
145142 impl_lookup = {}
146- groups = [
147- {"category" : "plot" , "values" : ["scatter" ]},
148- {"category" : "dom" , "values" : ["statistics" ]},
149- ]
143+ groups = [{"category" : "plot" , "values" : ["scatter" ]}, {"category" : "dom" , "values" : ["statistics" ]}]
150144 assert _image_matches_groups ("s1" , "matplotlib" , groups , spec_lookup , impl_lookup ) is False
151145
152146 def test_spec_not_in_lookup (self ) -> None :
@@ -223,10 +217,7 @@ def test_single_group(self) -> None:
223217 assert result == "filter:lib=matplotlib"
224218
225219 def test_multiple_groups_sorted (self ) -> None :
226- groups = [
227- {"category" : "plot" , "values" : ["scatter" ]},
228- {"category" : "lib" , "values" : ["matplotlib" ]},
229- ]
220+ groups = [{"category" : "plot" , "values" : ["scatter" ]}, {"category" : "lib" , "values" : ["matplotlib" ]}]
230221 result = _build_cache_key (groups )
231222 assert result == "filter:lib=matplotlib:plot=scatter"
232223
@@ -236,14 +227,8 @@ def test_values_sorted(self) -> None:
236227 assert result == "filter:lib=matplotlib,seaborn"
237228
238229 def test_stable_key_different_order (self ) -> None :
239- groups1 = [
240- {"category" : "lib" , "values" : ["matplotlib" ]},
241- {"category" : "plot" , "values" : ["scatter" ]},
242- ]
243- groups2 = [
244- {"category" : "plot" , "values" : ["scatter" ]},
245- {"category" : "lib" , "values" : ["matplotlib" ]},
246- ]
230+ groups1 = [{"category" : "lib" , "values" : ["matplotlib" ]}, {"category" : "plot" , "values" : ["scatter" ]}]
231+ groups2 = [{"category" : "plot" , "values" : ["scatter" ]}, {"category" : "lib" , "values" : ["matplotlib" ]}]
247232 assert _build_cache_key (groups1 ) == _build_cache_key (groups2 )
248233
249234
@@ -374,10 +359,7 @@ def test_no_filters_returns_all(self) -> None:
374359 assert len (result ) == 1
375360
376361 def test_filter_by_lib (self ) -> None :
377- images = [
378- {"spec_id" : "s1" , "library" : "matplotlib" },
379- {"spec_id" : "s1" , "library" : "seaborn" },
380- ]
362+ images = [{"spec_id" : "s1" , "library" : "matplotlib" }, {"spec_id" : "s1" , "library" : "seaborn" }]
381363 spec_lookup = {"s1" : {"tags" : {}}}
382364 impl_lookup = {}
383365 groups = [{"category" : "lib" , "values" : ["matplotlib" ]}]
@@ -432,10 +414,7 @@ class TestCalculateOrCounts:
432414
433415 def test_or_counts_for_single_group (self ) -> None :
434416 filter_groups = [{"category" : "lib" , "values" : ["matplotlib" ]}]
435- all_images = [
436- {"spec_id" : "s1" , "library" : "matplotlib" },
437- {"spec_id" : "s1" , "library" : "seaborn" },
438- ]
417+ all_images = [{"spec_id" : "s1" , "library" : "matplotlib" }, {"spec_id" : "s1" , "library" : "seaborn" }]
439418 spec_id_to_tags = {"s1" : {}}
440419 spec_lookup = {"s1" : {"tags" : {}}}
441420 impl_lookup = {}
0 commit comments