github / github/codeql

General issue - `py/not-named-cls` should trigger for implicit class methods

オープン
#2,826 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
Python question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**Description of the issue**

`py/not-named-cls` should trigger for wrong first arg name for special method names that implicitly make the methods class methods.
For example:
```py
class Example:
def __init_subclass__(self): # should error and say to use `cls` instead
pass

def __class_getitem__(self): # should error and say to use `cls` instead
pass
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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