E115, Expected an indented block (comment), not detected
まだ誰も着手していません。
評価
調査の方向性
まず、提供された Python スニペットを再現し、pycodestyle の単一の Python ソースファイル内で E115 チェッカーを追跡します。インデントを減らしたコメントのケースに対する回帰テストを追加または更新し、有効なブロックコメントを誤ってフラグ付けせずに報告されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
According to PEP-8 on block styles, it merely says:
Block comments generally apply to some (or all) code that follows them, and are indented to the same level as that code.
The existing E115 is supposed to check this. However, the following test code does not trigger it:
class SomeBase:
pass
class SomeClass(SomeBase):
def method(self, arg):
if not arg:
return "arg is false"
# Will return true on truthy
return "arg is true"
I think that should be caught. It does cause a problem with building documentation with Sphinx that includes source code snippets. The generated RST has the de-dented line signalling the end of the code block.
Thanks!
- 主要言語
- Python
- スター
- 5.2k
- フォーク
- 760
- 平均マージ
- 8時間 11分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PyCQA/pycodestyle のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
PyCQA/pycodestyle#1294 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
PyCQA/pycodestyle#1302 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
PyCQA/pycodestyle#1242 · コメント 2 件 ·
-
Spurious E231 for nested format substitutions再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
PyCQA/pycodestyle#1241 · コメント 2 件 · リアクション 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
PyCQA/pycodestyle#1217 ·
PyCQA/pycodestyle の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ansys/pyansys-common-mcp#213 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
freedomofpress/dangerzone#1594 ·
メンテナーはふだん 3 日以内に返信
-
priority:P1 status:in-review type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
randomparity/kdive#3317 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:ci
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mesonbuild/meson#16281 ·
メンテナーはふだん 1 日以内に返信