flake8-bugbear
flake8-bugbear copied to clipboard
A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.
```python CONSTANT = 1 def fn(x): global CONSTANT #
This will allow us to link to them directly. Using the syntax from https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#use-a-custom-anchor Example: https://github.com/jtojnar/flake8-bugbear/tree/readme-anchors#user-content-b950
The [async-lru](https://github.com/aio-libs/async-lru) project provides a port for Python's built-in [functools.lru_cache](https://docs.python.org/3/library/functools.html#functools.lru_cache) function for [asyncio](https://docs.python.org/3/library/asyncio.html). The same rules apply here with respect to garbage collection on instance methods. As this package is...
close https://github.com/PyCQA/flake8-bugbear/issues/513 I used B043 because I see PR with B042
In discussion https://github.com/astral-sh/ruff/issues/18338 suggested adding a rule similar to B009. If you don't mind, I could send a PR with this rule.
As of https://github.com/PyCQA/flake8-bugbear/pull/503 (cf https://github.com/PyCQA/flake8-bugbear/issues/497) the following emits no lint: ```console ❯ cat example.py import warnings warnings.warn("test", skip_file_prefixes=()) ❯ uvx --with git+https://github.com/PyCQA/flake8-bugbear flake8 --select B028 check example.py ❯ echo $?...