Skip to content

Commit 50baf64

Browse files
author
Matthias Koeppe
committed
src/bin/sage-fixdoctests: Do not act on 'NameError: x'
1 parent 26f5a09 commit 50baf64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bin/sage-fixdoctests

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ def process_block(block, src_in_lines, file_optional_tags):
224224
# NameError from top level, so keep it brief
225225
if m := re.match("NameError: name '(.*)'", got[index_NameError:]):
226226
name = m.group(1)
227+
if name == 'x': # Don't mark it '# needs sage.symbolic'; that's almost always wrong
228+
return
227229
if feature := name_feature(name):
228230
add_tags = [feature.name]
229231
else:

0 commit comments

Comments
 (0)