PyCQA/flake8-bugbear

Proposed opinionated warning against re.match

オープン

#132 opened on 2020/08/13

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)Python (116 件のフォーク)github user discovery
help wantedquestion

Repository metrics

Stars
 (1,116 個のスター)
PR merge metrics
 (平均マージ 4h 17m) (30d で 3 merged PRs)

説明

Technically, using re.match is valid. Realistically, the author probably meant .search and is going to lose a ton of time trying to figure out why her regex isn't working.

I'm speaking purely in compassion toward more junior developers; I would obviously never make such an elementary mistake myself. https://twitter.com/catherinedevlin/status/1257507010041520139

If you think you're likely to accept it, I'd be interested in authoring such a warning.

コントリビューターガイド