File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,22 @@ import base64
66import sys
77
88annotation_exceptions = {
9- 'prometheus_bcrypt_salt' : ' prometheusbcryptsalt'
9+ 'prometheus_bcrypt_salt' : { 'original' : ' prometheusbcryptsalt.o' , 'changed' : 'prometheusbcryptsalt.c' },
1010}
1111
12+
1213def annotate (ctx , value ):
1314 if not isinstance (value , str ):
14- return value
15- path_str = ctx ['path' ][0 ]
16- if path_str in annotation_exceptions :
17- return f"{ annotation_exceptions [path_str ]} .{ value } "
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 ]
1822 else :
19- return f"{ path_str } .{ value } "
23+ return f"{ '_' .join (path_str )} .{ value } "
24+
2025
2126def redact_int (ctx , x ):
2227 # 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