From bf8e39b8b55ef68cc56982c4d8c6cd68ebacaccc Mon Sep 17 00:00:00 2001 From: Michael Christensen Date: Fri, 14 Nov 2025 11:41:28 -0800 Subject: [PATCH] cea [A] [B] [B] Differential Revision: D86769888 --- benchpress/lib/job_listing.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/benchpress/lib/job_listing.py b/benchpress/lib/job_listing.py index bd65e68df..b271949af 100644 --- a/benchpress/lib/job_listing.py +++ b/benchpress/lib/job_listing.py @@ -6,7 +6,8 @@ # pyre-unsafe -from typing import List, Mapping, Optional +from collections.abc import Mapping +from typing import Optional import tabulate @@ -17,7 +18,7 @@ TABLE_HEADERS_TAG = ["Job", "Tags", "Description"] -def formalize_tags(configs) -> Mapping[str, List[str]]: +def formalize_tags(configs) -> Mapping[str, list[str]]: tags = {k: [] for k in JOB_TAG_GROUP} for config in configs: for k in tags: @@ -25,7 +26,7 @@ def formalize_tags(configs) -> Mapping[str, List[str]]: return tags -def get_tag_str(tags: Mapping[str, List[str]]) -> str: +def get_tag_str(tags: Mapping[str, list[str]]) -> str: all_tags = [] for k in tags: all_tags += sorted(tags[k]) @@ -33,7 +34,7 @@ def get_tag_str(tags: Mapping[str, List[str]]) -> str: def create_job_listing( - jobs: List[Mapping], + jobs: list[Mapping], table_format: str, group_key: Optional[str] = None, ) -> str: