sphinx-automodapi icon indicating copy to clipboard operation
sphinx-automodapi copied to clipboard

Strip unicode literal formatting from attribute documentation

Open embray opened this issue 10 years ago • 2 comments

On some doc pages for classes (and possibly modules)--for example Polynomial2D--under the "Attribute Documentation" literal values that involve unicode strings display them with the Python 2 style u'...' unicode literal syntax. Since in the vast majority of cases users won't care about this, it's just distracting. Since we can't provide a different repr for every possible object that might contain a str.__repr__ as part of its __repr__, a better approach, unfortunately, will be to just run a regexp over the final output when generating the attribute documentation.

embray avatar Jul 30 '15 19:07 embray

Or maybe get Python 3 documentation building working (can't remember what the blockers were on that), which presumably wouldn't do this? --- Actually, scratch that: we'd also have to make sure RTD is using Python 3.

mdboom avatar Jul 30 '15 20:07 mdboom

Right, I can build the docs locally with Python 3 just fine.

embray avatar Jul 31 '15 17:07 embray