Failure to parse docstrings where a section contains header-like content
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
NumpyDocStringのエントリポイントから開始し、提供されたwrapper docstring reproducerをバージョン1.9.0に対して実行します。セクションの解析中にインデントされたヘッダーのような内容がどのように認識されるかを追跡し、ネストされたParametersのテキストが通常の内容として扱われ、重複セクションエラーを発生させないことを示すカバレッジを追加します。
索引モデルが issue の本文から書いたものです。
説明
numpydoc.docscrape.NumpyDocString in version 1.9.0 fails to parse docstrings if there is content within a section that resembles a section header, e.g. the "Parameters\n----------" contains " Parameters\n----------"
Example reproducer: a function that takes a function as an argument and returnsanother function. The following docstring explains the returned function:
def wrapper(func):
'''
Wrap a simple function so that it takes a message string that gets printed to stdout when invoked.
Parameters
----------
func: function
Function to be wrapped. This can be any arbitrary synchronous function.
Returns
-------
wrapped_function: function
The returned function has the following signature::
wrapped_function(
message,
*args,
*kwargs,
)
\'\'\'
Parameters
----------
message: str
A custom message to be printed when the wrapped function is called.
*args
Additional arguments that are passed into the original function.
**kwargs
Extra arguments to the original function.
\'\'\'
'''
However, when using numpydoc.docscrape.NumpyDocString to parse this docstring, for example:
parsed = NumpyDocString(<example docstring above>)
...an exception is raised claiming to have duplicate Parameters section:
ValueError: The section `Parameters` appears twice in
Wrap a simple function so that it takes a message string that gets printed to stdout when invoked.
The desired behavior is to treat the nested Parameters "section" as regular content and not an actual section.
- 主要言語
- Python
- スター
- 354
- フォーク
- 185
- 平均マージ
- 4分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
numpy/numpydoc のほかの issue
-
Don't require ``RT01`` for properties再び着手できるかも @Nani-2007-code が 30 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
-
DOC: Version link overflowing on navbar再び着手できるかも @swoyer2 が 52 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
needs-decision
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
00 - Bug component: numpy.linalg
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
521xueweihan/HelloGitHub#4543 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
emeryberger/CSrankings#15700 ·
メンテナーはふだん 2 日以内に返信
-
Bug | 工作不正常 Triage | 待检查
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
OneDragon-Anything/ZenlessZoneZero-OneDragon#3084 ·
メンテナーはふだん 1 日以内に返信
-
Task select patterns with uppercase letters never match対応中かも @manobhisriram が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信