File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,23 @@ import hashlib
55import base64
66import sys
77
8+ annotation_exceptions = {
9+ 'prometheus_bcrypt_salt' : {'original' : 'prometheusbcryptsalt.o' , 'changed' : 'prometheusbcryptsalt.c' },
10+ }
11+
12+
813def annotate (ctx , value ):
9- if not isinstance (value , str ):
10- return value
11- path_str = map (str , ctx ['path' ])
12- return f"{ '.' .join (path_str )} .{ value } "
14+ if not isinstance (value , str ):
15+ return value
16+ path_str = * map (str , ctx ['path' ]),
17+ if path_str [0 ] in annotation_exceptions :
18+ if isinstance (annotation_exceptions [path_str [0 ]], str ):
19+ return annotation_exceptions [path_str [0 ]]
20+ else :
21+ return annotation_exceptions [path_str [0 ]][value ]
22+ else :
23+ return f"{ '_' .join (path_str )} .{ value } "
24+
1325
1426def redact_int (ctx , x ):
1527 # For numbers we can't indicate change with a string, so use sentinal values
You can’t perform that action at this time.
0 commit comments