2013-06-29 8 views
7

Mam następujący docstring:Bądź AutoDoc przedstawiają domyślne wartości Sfinksa w parametrach opis

def progress_bar(progress, length=20): 
    ''' 
    Returns a textual progress bar. 

    >>> progress_bar(0.6) 
    '[##########--------]' 

    :param progress: Number between 0 and 1 describes the progress. 
    :type progress: float 
    :param length: The length of the progress bar in chars. Default is 20. 
    :type length: int 
    :rtype: string 
    ''' 

Czy istnieje sposób, aby powiedzieć sphinx dodać «domyślnym jest X» część z parametrami opis jeśli są dostępne?

Odpowiedz

2

Nie jest to możliwe i musi zostać wykonane ręcznie.

Powiązane problemy