How can I add a plural-s after a Sphinx :class: directive

前端 未结 1 1231
臣服心动
臣服心动 2021-01-19 07:31

I have this problem all the time that I want to write a docstring like this:

def foo(arg):
   \'\'\'Add ``arg`` to the list of :class:`foo.bar.baz.Argument`s         


        
相关标签:
1条回答
  • 2021-01-19 08:17

    You should be able to use backslash-escaped whitespace.

    def foo(arg):
       '''Add ``arg`` to the list of :class:`foo.bar.baz.Argument`\ s.'''
       pass
    
    0 讨论(0)
提交回复
热议问题