Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for inclusion in pre-commit configuration #1

Merged
merged 2 commits into from
Apr 10, 2022
Merged
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
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