Menu ▾ ▴

pydoc code generation

f33l
2009-08-04
2013-03-15
  • f33l

    f33l - 2009-08-04

    Hi all,

    I'd like to modify the behavior of pydev's pydoc generation. When the cursor is on a function definition, and I hit ctrl+1, the following happens:

    def myfun(a, b):
    '''
    @param a:
    @param b:

    '''

    I would like to get the following, however:
    def myfun(a, b):
    """
    @param a:
    @type a:
    @param b:
    @type b

    @return:
    @rtype

    """

    Is is possible to alter pydev's default behavior? If so, how?

    Thanks,
    Chris

     
  • Anonymous

    Anonymous - 2010-03-25

    Open the Eclipse Preferences under the Window menu. Go to Pydev -> Editor -> Code Style -> Docstrings. Change the Docstring Character to Quotation mark(").

    That should do it

     
  • Brandon

    Brandon - 2010-03-29

    So, that solves his problem of using single quotes but how about adding return and return type doctags?  (I would also like to know)

    By the way, if you want to generate the @type parts then go to the same location in the preferences and set "Type doctag generation" to Always (or some custom setting)