deadcode
deadcode copied to clipboard
Find and fix unused Python code using command line.
If I pipe to a file the file is empty. What I tried: ```bash deadcode . --exclude=tests,tasks,src/tools --ignore-names-in-files=migrations > deadcode.txt ```
Lovely project! Alas, https://deadcode.readthedocs.io does not resolve to docs.
deadcode version: ``` [[package]] name = "deadcode" version = "2.2.2" description = "Find and remove dead code." category = "dev" optional = false python-versions = ">=3.8" files = [ {file...
With an unused function, this works: ```python def check(arg): # noqa: DC002 pass ``` but this doesn't: ```python @cache def check(arg): # noqa: DC002 pass ``` This works again, but...
Perhaps because of the way we specify routes in FastAPI, when I run deadcode on a FastAPI project it identify nearly everything as dead code. Is there a way to...
Hi, nice project, I really like it! A few things that should be added: ### Tag versions as you release them `.pre-commit-config.yaml` expects a `rev` which is either - a...
I am getting this error when I try to run this command on a directory within Django with just a bunch of Python files with subdirectories. ``` >>> deadcode ....
By default wildcard import imports all the names, which do not start with underscore. However, it is possible to limit names, which might be imported by defining `__all__` variable in...
This fix the issue #22 with the encoding on Wndows 11.
When I run `deadcode.exe .` from the terminal, everything works fine  But if I run the pre-commit hook I get a `UnicodeEncodeError` ``` deadcode.................................................................Failed - hook id: deadcode -...