@@ -610,24 +610,24 @@ def relevant_environment_display(env: Mapping[str, str]) -> list[tuple[str, str]
610610 A list of pairs (name, value) to show.
611611
612612 """
613- slugs = {"COV" , "PY" }
614- include = {"HOME" , "TEMP" , "TMP" }
615- cloak = {"API" , "TOKEN" , "KEY" , "SECRET" , "PASS" , "SIGNATURE" }
616- truncate = {"COVERAGE_PROCESS_CONFIG" }
617- truncate_len = 60
613+ SLUGS = {"COV" , "PY" }
614+ INCLUDE = {"HOME" , "TEMP" , "TMP" }
615+ CLOAK = {"API" , "TOKEN" , "KEY" , "SECRET" , "PASS" , "SIGNATURE" }
616+ TRUNCATE = {"COVERAGE_PROCESS_CONFIG" }
617+ TRUNCATE_LEN = 60
618618
619619 to_show = []
620620 for name , val in env .items ():
621- keep = False
622- if name in include :
623- keep = True
624- elif any (slug in name for slug in slugs ):
625- keep = True
626- if keep :
627- if any (slug in name for slug in cloak ):
621+ show = False
622+ if name in INCLUDE :
623+ show = True
624+ elif any (slug in name for slug in SLUGS ):
625+ show = True
626+ if show :
627+ if any (slug in name for slug in CLOAK ):
628628 val = re .sub (r"\w" , "*" , val )
629- if name in truncate :
630- if len (val ) > truncate_len :
631- val = val [:truncate_len - 3 ] + "..."
629+ if name in TRUNCATE :
630+ if len (val ) > TRUNCATE_LEN :
631+ val = val [:TRUNCATE_LEN - 3 ] + "..."
632632 to_show .append ((name , val ))
633633 return human_sorted_items (to_show )
0 commit comments