PyCQA/flake8-bugbear

Proposed opinionated warning against re.match

Offen

#132 geöffnet am 13.08.2020

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Python (116 Forks)github user discovery
help wantedquestion

Repository-Metriken

Stars
 (1.116 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 4h 17m) (3 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide