File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
[ ![ Deadcode Logo] ( https://raw.githubusercontent.com/albertas/deadcode/main/docs/_static/deadcode-logo-readme.png )] ( https://deadcode.readthedocs.io/en/stable/ )
2
2
3
- <h2 align =" center " >Detect and Fix Unused Python Code</h2 >
3
+ <h2 align =" center " >Find and Fix Unused Python Code</h2 >
4
4
5
5
<p align =" center " >
6
6
<a href =" https://github.com/albertas/deadcode/blob/main/LICENSE " ><img alt =" License: AGPLv3 " src =" https://raw.githubusercontent.com/albertas/deadcode/main/docs/_static/AGPLv3-license.svg " ></a >
@@ -15,11 +15,22 @@ pip install deadcode
15
15
```
16
16
17
17
## Usage
18
+ To see unused code findings:
18
19
``` shell
19
20
deadcode .
20
21
```
21
22
22
- Or with command line options:
23
+ To see suggested fixes:
24
+ ``` shell
25
+ deadcode . --fix --dry
26
+ ```
27
+
28
+ To fix:
29
+ ``` shell
30
+ deadcode . --fix
31
+ ```
32
+
33
+ Tune out some of the false positives, e.g.:
23
34
```
24
35
deadcode . --exclude=venv,tests --ignore-names=BaseTestCase,*Mixin --ignore-names-in-files=migrations
25
36
```
You can’t perform that action at this time.
0 commit comments