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:
JojoBoulix
2016-06-09 09:11:48 +02:00
parent b3e82fadc4
commit 2eeaceed08

View File

@@ -20,7 +20,7 @@ from sphinx.util import force_decode
# relatively import this module
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: