Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

E115, Expected an indented block (comment), not detected

オープン
#1,137 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
tooling

調査の方向性

まず、提供された 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PyCQA/pycodestyle のほかの issue

PyCQA/pycodestyle の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。