You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by CharSyam <ch...@gmail.com> on 2012/06/18 13:08:19 UTC
[dev] What is a good way to reduce pep8 error in docstring.
Hi, I'm DaeMyung Kang.
I am fixing pep8 error or warning.
but I encounter a problem.
it is "E501 line too long" error in docstring
such as
@keyword name: Name of the script to upload it as, if not specified, a
random name will be choosen.
i tried to divide it with line. but its result is not good. because pydoc
make that line like this.
original:
@keyword name: Name of the script to upload it as, if not specified, a
random name will be choosen.
divide with line:
@keyword name: Name of the script to upload it
as,_________________________if not specified, a random name will be
choosen.
which one is better?
in my opinion, I think original is better. so i will leave this kind of
pep8 error in docstring.
I wait to hear other's opinion. thank you.
Re: [dev] What is a good way to reduce pep8 error in docstring.
Posted by Tom Davis <to...@dislocatedday.com>.
On Jun 18, 2012, at 7:08 AM, CharSyam <ch...@gmail.com> wrote:
> Hi, I'm DaeMyung Kang.
>
> I am fixing pep8 error or warning.
>
> but I encounter a problem.
>
> it is "E501 line too long" error in docstring
>
> such as
>
> @keyword name: Name of the script to upload it as, if not specified, a
> random name will be choosen.
>
> i tried to divide it with line. but its result is not good. because pydoc
> make that line like this.
>
> original:
> @keyword name: Name of the script to upload it as, if not specified, a
> random name will be choosen.
>
>
> divide with line:
> @keyword name: Name of the script to upload it
> as,_________________________if not specified, a random name will be
> choosen.
>
> which one is better?
>
> in my opinion, I think original is better. so i will leave this kind of
> pep8 error in docstring.
>
> I wait to hear other's opinion. thank you.
Did you try indenting subsequent lines? That works with Sphinx, I can't recall if it does with pydoc.
So:
@keyword foo: Line one.
Line two.