We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 104e967 commit 3131455Copy full SHA for 3131455
1 file changed
src/python_minifier/f_string.py
@@ -49,13 +49,14 @@ def candidates(self):
49
if is_ast_node(v, ast.Str):
50
51
# Could this be used as a debug specifier?
52
- debug_specifier = re.match(r'.*=\s*$', v.s)
53
- if debug_specifier:
54
- # Maybe!
55
- try:
56
- debug_specifier_candidates = [x + '{' + v.s + '}' for x in candidates]
57
- except Exception as e:
58
- continue
+ if len(candidates) < 10:
+ debug_specifier = re.match(r'.*=\s*$', v.s)
+ if debug_specifier:
+ # Maybe!
+ try:
+ debug_specifier_candidates = [x + '{' + v.s + '}' for x in candidates]
+ except Exception as e:
59
+ continue
60
61
try:
62
candidates = [x + self.str_for(v.s, quote) for x in candidates]
0 commit comments