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 103 forks source link

Contextvar mutable or call default #476

Closed jakkdl closed 1 week ago

jakkdl commented 2 weeks ago

fixes #475

Not the prettiest extension of FunctionDefDefaultsVisitor, and left e.g. B006.mutable_literals as bound to B006 and the naming of b008_extend_immutable_calls. I'll fix those later unless we want to reuse B006/B008 for ContextVars, or maybe just a couple comments saying that B039 also uses them.

Also adding 3.13 to CI to check for any problems there

cooperlees commented 2 weeks ago

P.s. Let's make isort happy

jakkdl commented 1 week ago

Added some comments to note where b006/b008 stuff also applies to b039, and fixed isort. Ready to merge unless @Zac-HD wants to have opinions