mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove all memory addresses from autodoc
Change `object_desription()` to remove all hexadecimal addresses, not only those at the end of the string. The `repr()` of some objects is generated by taking the `repr()` of one object and then adding stuff to it. Therefore, memory addresses like `<object foo at 0xabcdef>` do not need to occur at the end of the string.
This commit is contained in:
@@ -20,7 +20,7 @@ from sphinx.util import force_decode
|
|||||||
# relatively import this module
|
# relatively import this module
|
||||||
inspect = __import__('inspect')
|
inspect = __import__('inspect')
|
||||||
|
|
||||||
memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>$)')
|
memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>)')
|
||||||
|
|
||||||
|
|
||||||
if PY3:
|
if PY3:
|
||||||
|
|||||||
Reference in New Issue
Block a user