File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ def _fix_percent_format_dict(
195195 elif k .value in KEYWORDS :
196196 return
197197 seen_keys .add (k .value )
198- keys [ast_to_offset (k )] = k
198+ keys [ast_to_offset (k )] = k . value
199199
200200 # TODO: this is overly timid
201201 brace = i + 4
@@ -211,13 +211,13 @@ def _fix_percent_format_dict(
211211 if key is None :
212212 continue
213213 # we found the key, but the string didn't match (implicit join?)
214- elif ast .literal_eval (token .src ) != key . value :
214+ elif ast .literal_eval (token .src ) != key :
215215 return
216216 # the map uses some strange syntax that's not `'key': value`
217217 elif tokens [j + 1 ].src != ':' or tokens [j + 2 ].src != ' ' :
218218 return
219219 else :
220- key_indices .append ((j , key . value ))
220+ key_indices .append ((j , key ))
221221 assert not keys , keys
222222
223223 tokens [brace_end ] = tokens [brace_end ]._replace (src = ')' )
You can’t perform that action at this time.
0 commit comments