0

Quick Sphinx question: When I use :show-inheritance: within an autoclass definition for a Python class, the output contains the full names of the base classes, including package and module names. Setting add_module_names = False in the conf.py doesn't do anything here. Is there any way I can change that?

The_Fallen
  • 257
  • 1
  • 3
  • 10
  • 1
    Does this help? https://stackoverflow.com/q/47903710/407651 – mzjn Apr 13 '21 at 17:44
  • Hmm, that actually seems to work. Since it's about my own classes, I can even set `__module__` as class variable. Anyone knows whether there are any side effects from modifying `__module__` like this? – The_Fallen Apr 14 '21 at 11:36
  • I don't think so. Perhaps this is of interest to you: https://stackoverflow.com/q/10113892/407651. – mzjn Apr 14 '21 at 11:49
  • Yeah, I've read that. The one answer yields towards "don't bother", while the other leans more towards "there are some edge cases and in the future it might be used". Not really helpful... Anyway, I'm doing it that way now, let's wait for it to break. ;-) Thanks! – The_Fallen Apr 14 '21 at 11:56

0 Answers0