atom-community / atom-community/ide-python
Can't suppress Mccabe.
- 主要言語
- JavaScript
- スター
- 238
- フォーク
- 40
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi everyone,
below I have build an example for a McCabe-violation from the anti-pattern on Flake8's website.
`def post_comment(self): # noqa
if self.success: # noqa
comment = 'Build succeeded'
elif self.warning:
comment = 'Build had issues'
elif self.failed:
comment = 'Build failed'
if self.success:
self.post(comment, type='success')
else:
self.post(comment, type='error')
if self.success:
comment = 'Build succeeded'
elif self.warning:
comment = 'Build had issues'
elif self.failed:
comment = 'Build failed'
if self.success:
self.post(comment, type='success')
else:
self.post(comment, type='error')
if self.success:
comment = 'Build succeeded'
elif self.warning:
comment = 'Build had issues'
elif self.failed:
comment = 'Build failed'
if self.success:
self.post(comment, type='success')
else:
self.post(comment, type='error')
if self.success:
comment = 'Build succeeded'
elif self.warning:
comment = 'Build had issues'
elif self.failed:
comment = 'Build failed'
if self.success:
self.post(comment, type='success')
else:
self.post(comment, type='error')
`
Predictably, this results in a warning. However, adding `noqa` does not manage to suppress these.

Kind regards.
コントリビューションガイド
調査の方向性
まず、投稿された Python の McCabe 違反の例を Atom で再現し、Python linting の出力が noqa コメントをどのように扱うかを確認します。例で示された noqa アノテーションを使用したときに McCabe 警告が抑制されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100