@@ -312,15 +312,10 @@ def generate_domain_query(
312312
313313
314314def _view_matches_category (view_name : str , category : str ) -> bool :
315- """Return True if view name matches the category (e.g. 'kernels' matches 'kernel') ."""
315+ """Return True if view name matches the category."""
316316 v = view_name .lower ()
317317 c = category .lower ()
318- return (
319- v == c
320- or v .startswith (c + "_" )
321- or v == c + "s"
322- or v .startswith (c + "s_" )
323- )
318+ return v == c or v .startswith (c + "_" ) or v == c + "s" or v .startswith (c + "s_" )
324319
325320
326321def create_summary_queries (
@@ -352,8 +347,7 @@ def create_summary_queries(
352347
353348 if only_view_categories is not None :
354349 if not any (
355- _view_matches_category (view_name , cat )
356- for cat in only_view_categories
350+ _view_matches_category (view_name , cat ) for cat in only_view_categories
357351 ):
358352 continue
359353
@@ -506,9 +500,9 @@ def generate_all_summaries(connection: RocpdImportData, **kwargs: Any) -> None:
506500
507501 # Create the summary queries.
508502 # When region_categories is specified (and not NONE), only include view-based
509- # summaries that match those categories (e.g. "kernels" view for KERNEL) and
510- # only region summaries for those categories. With --region-categories NONE we
511- # only skip region summaries and still include all view-based summaries.
503+ # summaries that match those categories and only region summaries for those categories.
504+ # With --region-categories NONE we only skip region summaries and still include
505+ # all view-based summaries.
512506 is_none_categories = (
513507 region_categories is not None
514508 and len (region_categories ) == 1
0 commit comments