astropy / sphinx-automodapi

Sphinx extension for generating API documentation
https://sphinx-automodapi.readthedocs.io
BSD 3-Clause "New" or "Revised" License
65 stars 45 forks source link

Strip unicode literal formatting from attribute documentation #57

Open embray opened 9 years ago

embray commented 9 years ago

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.

mdboom commented 9 years ago

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.

embray commented 9 years ago

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