PyCQA / flake8-bugbear

A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.
MIT License
1.05k stars 104 forks source link

Proposed opinionated warning against re.match #132

Open catherinedevlin opened 4 years ago

catherinedevlin commented 4 years ago

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.

cooperlees commented 4 years ago

I'd like another maintainer to comment, but if this was disabled by default I'd accept the PR as we've all done this.