Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac 30778: patch sageinspect to not print warning when skipfile retu…
Browse files Browse the repository at this point in the history
…rns True.
  • Loading branch information
jhpalmieri committed Oct 1, 2021
1 parent f35123c commit 94727df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/misc/sageinspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2062,10 +2062,10 @@ def sage_getdoc(obj, obj_name='', embedded=False):
r = sage_getdoc_original(obj)
s = sage.misc.sagedoc.format(r, embedded=embedded)
f = sage_getfile(obj)
if f:
if f and os.path.exists(f):
from sage.doctest.control import skipfile
skip = skipfile(f)
if skip:
if isinstance(skip, str):
warn = """WARNING: the enclosing module is marked '{}',
so doctests may not pass.""".format(skip)
s = warn + "\n\n" + s
Expand Down

0 comments on commit 94727df

Please sign in to comment.