2017-08-31 13 views
2

私はPythonのファイルの上に私のドキュメンテーション文字列に探鉱を使用しようとしています。ここでPEP257 - D212、およびD213が競合していますか?

は私のドキュメンテーション文字列の例です:

"""item_exporters.py contains Scrapy item exporters. 

Once you have scraped your items, you often want to persist or export those items, to use the data in some other 
application. That is, after all, the whole purpose of the scraping process. 

For this purpose Scrapy provides a collection of Item Exporters for different output formats, such as XML, CSV or JSON. 

More Info: 
    https://doc.scrapy.org/en/latest/topics/exporters.html 

""" 

それは問題があります。したがって、私がダウンして最初の行を移動し、それが二行目で開始すると

pep257: D213/Multi-line docstring summary should start at the second line 

を:

""" 
item_exporters.py contains Scrapy item exporters. 

Once you have scraped your items, you often want to persist or export those items, to use the data in some other 
application. That is, after all, the whole purpose of the scraping process. 

For this purpose Scrapy provides a collection of Item Exporters for different output formats, such as XML, CSV or JSON. 

More Info: 
    https://doc.scrapy.org/en/latest/topics/exporters.html 

""" 

私がプロスペクターをもう一度実行すると、D212がエラーとして表示されます。

pep257: D212/Multi-line docstring summary should start at the first line 

D212とD213に問題はありますか? ignoreフラグの使用

+1

をうーん、これは少し奇妙に思えます。 [PEP257(https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings)要約ラインが開く引用符と同じ行または次の行にすることができる」と言います。 "両方とも上手くいくでしょう。 –

+0

@ChristianDean D212とD213が最近追加されたかどうかを確認する方法はありますか?矛盾するルールのように見えます。 – user1157751

+0

ああ、私はちょうど簡単なGoogle検索をしました。これは参考になりました:https://github.com/PyCQA/pydocstyle/issues/242。 –

答えて

関連する問題