How do I omit the values of variables on Sphinx?

前端 未结 1 1982
我在风中等你
我在风中等你 2020-12-04 00:25

I have some module-level variables that have long and uninteresting values which I would like to exclude from auto-generated documentation. Is there a way to do this?

<
相关标签:
1条回答
  • 2020-12-04 00:46

    Two solutions I can think of:

    • Use the monkey patch for truncating long variable values suggested in this answer: https://stackoverflow.com/a/25163963/407651.

    • Document the module-level variable using autodata with the annotation option.

    0 讨论(0)
提交回复
热议问题