Skip to content

Commit

Permalink
Add instructions for inclusion in pre-commit configuration (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalosak authored Apr 10, 2022
1 parent 66e969c commit dd607e1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ little more palatable.


## Usage
First, move your flake8 configuration to pyproject.toml. Then, optionally, include it in your
git pre-commit hooks.

Say your Flake8 configuration in `.flake8` (or in `tox.ini`, or
`setup.cfg`) is this:
### Move flake8 to your pyproject.toml
Say your Flake8 configuration in `.flake8` (or in `tox.ini`, or `setup.cfg`) is this:
```ini
[flake8]
ignore = E231, E241
Expand All @@ -54,6 +56,17 @@ From then on run `flake8p` instead of `flake8` to lint the code so

[TOML format]: https://toml.io

### Include flake8p in your git pre-commit
Automatically apply `flake8p` upon `git commit` by adding the following to your project's pre-commit
config:

```yaml
# your-project-root/.pre-commit-hooks.yaml
- repo: https://github.com/john-hen/Flake8-pyproject
rev: 0.9.0
hooks:
- id: Flake8-pyproject
```
## Implementation
Expand Down

0 comments on commit dd607e1

Please sign in to comment.