Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- id: auto-optional
name: auto-optional
description: Adds the Optional type-hint to arguments where the default value is None
entry: auto-optional
language: python
types: [python]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ Install with `pip install auto-optional`.
## Run
After installing you can run auto-optional using `auto-optional [path]` (path is an optional argument).

## pre-commit

You can run auto-optional via [pre-commit](https://pre-commit.com/).
Add the following text to your repositories `.pre-commit-config.yaml`:

```yaml
repos:
- repo: https://github.com/luttik/auto-optional
rev: v0.2.0 # The version of auto-optional to use
hooks:
- id: auto-optional
```

## Things of note

### Things that are handled well
Expand Down
13 changes: 13 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ Install with `pip install auto-optional`.
## Run
After installing you can run auto-optional using `auto-optional [path]` (path is an optional argument).

## pre-commit

You can run auto-optional via [pre-commit](https://pre-commit.com/).
Add the following text to your repositories `.pre-commit-config.yaml`:

```yaml
repos:
- repo: https://github.com/luttik/auto-optional
rev: v0.2.0 # The version of auto-optional to use
hooks:
- id: auto-optional
```

## Things of note

### Things that are handled well
Expand Down