Fix linter action error in Run psf/black@stable
Closed this issue · 1 comments
ftnext commented
以下のblackのチェックでエラーが送出されるようになっている
pyconjpbot/.github/workflows/linter.yml
Line 25 in c486735
→エラーが送出されないように、blackが求める形式で書き換えます
エラーの情報
https://github.com/pyconjp/pyconjpbot/runs/6226765507?check_suite_focus=true
2 files would be reformatted, 24 files would be left unchanged.
抜粋
- pluses = Plusplus.select().where(Plusplus.name ** pattern)
+ pluses = Plusplus.select().where(Plusplus.name**pattern)
- responses = Response.select().where(term == term, Response.text ** pat)
+ responses = Response.select().where(term == term, Response.text**pat)
ftnext commented
**
演算子についてblackのフォーマットルールが変わった
- 例えば20.8b1では空白を入れるようにフォーマットする
2**5
->2 ** 5
- 22.3.0(現在のstable)では空白を入れないようにフォーマットする
2 ** 5
->2**5
https://github.com/psf/black/blob/main/CHANGES.md#2210
Remove spaces around power operators if both operands are simple
**
はpeeweeでILIKE
http://docs.peewee-orm.com/en/latest/peewee/api.html#ColumnBase