marshmallow icon indicating copy to clipboard operation
marshmallow copied to clipboard

pre-commit autoupdate

Open lafrech opened this issue 1 year ago • 0 comments

Looks like pre-commit libs are a bit outdated (maybe showing we should be using pre-commit-ci ?).

I had to fix the config due to complicated issues I tried to explain in https://github.com/PyCQA/flake8/issues/1687.

Also, this updates flake8-bugbear which raises 2 new issues.

For one of them I think we can disable locally with a comment saying we know what we're doing.

The other error is about the use of lru_cache:

src/marshmallow/schema.py:1063:6: B019 Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks. The cache may retain instance references, preventing garbage collection.

I'm not sure it is that bad since we set a maxsize. pylint doesn't seem to care in this case (https://github.com/PyCQA/pylint/pull/6181). We could ignore locally. Or rework the method but is it worth it?

Edit: remove extend-select thanks to @asottile suggestion in https://github.com/PyCQA/flake8/issues/1687#issuecomment-1248290052.

lafrech avatar Sep 15 '22 15:09 lafrech