@@ -36,7 +36,7 @@ def is_correct_ast(self, code):
3636 c = ast .parse (code , 'FString candidate' , mode = 'eval' )
3737 compare_ast (self .node , c .body )
3838 return True
39- except Exception as e :
39+ except Exception :
4040 return False
4141
4242 def complete_debug_specifier (self , partial_specifier_candidates , value_node ):
@@ -79,12 +79,12 @@ def candidates(self):
7979 # Maybe!
8080 try :
8181 debug_specifier_candidates = [x + '{' + v .s for x in candidates ]
82- except Exception as e :
82+ except Exception :
8383 continue
8484
8585 try :
8686 candidates = [x + self .str_for (v .s , quote ) for x in candidates ]
87- except Exception as e :
87+ except Exception :
8888 continue
8989 elif isinstance (v , ast .FormattedValue ):
9090 try :
@@ -93,15 +93,14 @@ def candidates(self):
9393 x + y for x in candidates for y in FormattedValue (v , nested_allowed , self .pep701 ).get_candidates ()
9494 ] + completed
9595 debug_specifier_candidates = []
96- except Exception as e :
96+ except Exception :
9797 continue
9898 else :
9999 raise RuntimeError ('Unexpected JoinedStr value' )
100100
101101 actual_candidates += ['f' + quote + x + quote for x in candidates ]
102102
103- actual_candidates = filter (self .is_correct_ast , actual_candidates )
104- return actual_candidates
103+ return filter (self .is_correct_ast , actual_candidates )
105104
106105 def str_for (self , s , quote ):
107106 return s .replace ('{' , '{{' ).replace ('}' , '}}' )
0 commit comments