@@ -94,7 +94,7 @@ def fake_RIFtol(*args):
94
94
ansi_escape_sequence = re .compile (r'(\x1b[@-Z\\-~]|\x1b\[.*?[@-~]|\x9b.*?[@-~])' )
95
95
96
96
special_optional_regex = 'arb216|arb218|py2|long time|not implemented|not tested|known bug'
97
- tag_with_explanation_regex = fr '((?:\w|[.])+)\s*(?:\((.*?)\))?'
97
+ tag_with_explanation_regex = r '((?:\w|[.])+)\s*(?:\((.*?)\))?'
98
98
optional_regex = re .compile (fr'(?P<cmd>{ special_optional_regex } )\s*(?:\((?P<cmd_explanation>.*?)\))?|'
99
99
fr'[^ a-z]\s*(optional|needs)(?:\s|[:-])*(?P<tags>(?:(?:{ tag_with_explanation_regex } )\s*)*)' ,
100
100
re .IGNORECASE )
@@ -470,7 +470,7 @@ def update_optional_tags(line, tags=None, *, add_tags=None, remove_tags=None, fo
470
470
| V V V V V V v v v v
471
471
| sage: # optional - magma, needs sage.symbolic
472
472
"""
473
- if not ( m := re .match ('( *sage: *)(.*)' , line ) ):
473
+ if not re .match ('( *sage: *)(.*)' , line ):
474
474
raise ValueError (f'line must start with a sage: prompt, got: { line } ' )
475
475
476
476
current_tags , line_sans_tags , is_persistent = parse_optional_tags (line .rstrip (), return_string_sans_tags = True )
@@ -1141,7 +1141,7 @@ def update_tag_counts(optional_tags):
1141
1141
def check_and_clear_tag_counts ():
1142
1142
if (num_examples := tag_count_within_block ['' ]) >= 4 :
1143
1143
if overused_tags := {tag for tag , count in tag_count_within_block .items ()
1144
- if tag and count >= num_examples }:
1144
+ if tag and count >= num_examples }:
1145
1145
overused_tags .update (persistent_optional_tags )
1146
1146
overused_tags .difference_update (self .file_optional_tags )
1147
1147
suggested = unparse_optional_tags (overused_tags , prefix = 'sage: # ' )
@@ -1211,9 +1211,9 @@ def check_and_clear_tag_counts():
1211
1211
1212
1212
if self .optional_tags is not True :
1213
1213
extra = {tag
1214
- for tag in optional_tags
1215
- if (tag not in self .optional_tags
1216
- and tag not in available_software )}
1214
+ for tag in optional_tags
1215
+ if (tag not in self .optional_tags
1216
+ and tag not in available_software )}
1217
1217
if extra :
1218
1218
if any (tag in external_software for tag in extra ):
1219
1219
# never probe "external" software
0 commit comments