You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecation warning from importlib due to \dot, etc., in docstrings #182
This particular line (and similar ones near it) are using a Sphinx :math: command (on the previous line) so that they are typeset as mathematics using sphinx (and on readthedocs). Whatever fix is used, we should try to preserve this level of processing, so that the online documentation looks nice. Not sure how raw strings are interpreted by Sphinx.
Assuming Sphinx uses the Python interpreter to load modules, which seems likely (why write a Python parser if you don't have to?), Sphinx shouldn't care about the differences between raw and ordinary strings.
Separately: I still can't get Sphinx to work. I can hack around the error I'm getting with this patch to numpydocs.py
--- numpydoc.py.orig 2017-06-20 11:30:40.000000000 +0200
+++ numpydoc.py 2018-01-08 21:34:58.110632976 +0200
@@ -115,7 +115,8 @@
return
doc = SphinxDocString(pydoc.getdoc(obj))
sig = doc['Signature'] or getattr(obj, '__text_signature__', None)
- if sig:
+ from mock import Mock
+ if sig is not None and not isinstance(sig,Mock):
sig = re.sub(sixu("^[^(]*"), sixu(""), sig)
return sig, sixu('')
so it's something to do with a Mock object. I don't know the mock library, and couldn't figure out what is being mocked.
Even after this workaround, I don't get typeset equations (e.g., for \dot x = A x + B u I see that text, not the equation). I do have LaTeX installed, but perhaps there's some additional Sphinx plugin required.
Activity
murrayrm commentedon Jan 6, 2018
This particular line (and similar ones near it) are using a Sphinx
:math:command (on the previous line) so that they are typeset as mathematics using sphinx (and on readthedocs). Whatever fix is used, we should try to preserve this level of processing, so that the online documentation looks nice. Not sure how raw strings are interpreted by Sphinx.roryyorke commentedon Jan 8, 2018
A raw string is used in one place, namely the long, long string at the end of
control/matlab/__init__.py--- however, I don't think that string is actually used (can't find that table on the readthedocs site).Assuming Sphinx uses the Python interpreter to load modules, which seems likely (why write a Python parser if you don't have to?), Sphinx shouldn't care about the differences between raw and ordinary strings.
Separately: I still can't get Sphinx to work. I can hack around the error I'm getting with this patch to numpydocs.py
so it's something to do with a Mock object. I don't know the mock library, and couldn't figure out what is being mocked.
Even after this workaround, I don't get typeset equations (e.g., for
\dot x = A x + B uI see that text, not the equation). I do have LaTeX installed, but perhaps there's some additional Sphinx plugin required.murrayrm commentedon Jan 15, 2018
Fixed in PR #187 by escaping backlashes.
Created a separate issue #188.