PyCQA/flake8-bugbear

Proposed opinionated warning against re.match

开放

#132 创建于 2020年8月13日

 (1 条评论) (0 个反应) (0 位负责人)Python (116 个派生)github user discovery
help wantedquestion

仓库指标

星标
 (1,116 个星标)
PR 合并指标
 (平均合并 4小时 17分钟) (30 天内合并 3 个 PR)

描述

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.

贡献者指南