PyCQA/flake8-bugbear

Proposed opinionated warning against re.match

Aperta

#132 aperta il 13 ago 2020

 (1 commento) (0 reazioni) (0 assegnatari)Python (116 fork)github user discovery
help wantedquestion

Metriche repository

Star
 (1116 stelle)
Metriche merge PR
 (Merge medio 4h 17m) (3 PR mergiate in 30 g)

Descrizione

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.

Guida contributor