#8325: Sphinx warning: 'Could not parse cython argspec'
-----------------------------+----------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.3.4
Component: documentation | Keywords:
Author: Mitesh Patel | Upstream: N/A
Reviewer: John Palmieri | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by jhpalmieri):
On one hand, this seems to fix the two particular doctests in question.
On the other, it's not perfect. I can see two problems, one of which I
know how to fix:
- if the source has the (unlikely) form {{{def f({(1,2,3): True}):
...}}}, then this version (and all previous versions) will think that the
arg spec ends after {{{(1,2,3):}}}. The function
{{{_sage_getargspec_from_ast}}} can actually handle this kind of thing,
though, so I think we should pass the entire source code to it, rather
than truncate at the first {{{):}}}. That is, delete line 470 and change
line 471 from
{{{
proxy = 'def dummy' + source[beg:end] + '\n return'
}}}
to
{{{
proxy = 'def dummy' + source[beg:] + '\n return'
}}}
- if the docstring has type information, it can't handle it. I don't
know what to do about this, or if it's worth it.
Should we fix the first problem and then go ahead with this? I also
notice that the methods for {{{SageArgSpecVisitor}}} don't have doctests.
Is that possible for these sorts of things? I know nothing about ast.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8325#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.