Skip to content

Commit

Permalink
Add more usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
albertas committed Apr 6, 2024
1 parent 3bf6b16 commit f2e3b00
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Deadcode Logo](https://raw.githubusercontent.com/albertas/deadcode/main/docs/_static/deadcode-logo-readme.png)](https://deadcode.readthedocs.io/en/stable/)

<h2 align="center">Detect and Fix Unused Python Code</h2>
<h2 align="center">Find and Fix Unused Python Code</h2>

<p align="center">
<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>
Expand All @@ -15,11 +15,22 @@ pip install deadcode
```

## Usage
To see unused code findings:
```shell
deadcode .
```

Or with command line options:
To see suggested fixes:
```shell
deadcode . --fix --dry
```

To fix:
```shell
deadcode . --fix
```

Tune out some of the false positives, e.g.:
```
deadcode . --exclude=venv,tests --ignore-names=BaseTestCase,*Mixin --ignore-names-in-files=migrations
```
Expand Down

0 comments on commit f2e3b00

Please sign in to comment.