Skip to content

Commit

Permalink
🔀 Merge pull request #46 from astariul/flake518
Browse files Browse the repository at this point in the history
Use `flake518` instead of `pflake8`
  • Loading branch information
astariul authored Feb 15, 2022
2 parents 2b0973f + 4e3a0a5 commit fb90888
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
black --check .
- name: Check format with flake8
run: |
pip install pyproject-flake8
pflake8 .
pip install flake518
flake518 .
- name: Check docstrings with darglint
run: |
pip install darglint
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.1.0
hooks:
- id: trailing-whitespace
exclude: "coverage.svg$"
Expand All @@ -10,21 +10,21 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pycqa/isort
rev: "5.9.3"
rev: "5.10.1"
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: "21.9b0"
rev: "22.1.0"
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: "3.8.3"
rev: "3.9.2"
hooks:
- id: flake8
entry: pflake8
additional_dependencies: [pyproject-flake8]
entry: flake518
additional_dependencies: [flake518]
- repo: https://github.com/terrencepreilly/darglint
rev: "v1.8.1"
hooks:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Python Template repository
It's just a template repository for python, with the following features :

* 📚 Beautiful documentation with [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/), published as a Github page with [mike](https://github.com/jimporter/mike) automatically
* ✨ Code style checks with [isort](https://github.com/PyCQA/isort), [black](https://github.com/psf/black), [pflake8](https://github.com/csachs/pyproject-flake8), [darglint](https://github.com/terrencepreilly/darglint)
* ✨ Code style checks with [isort](https://github.com/PyCQA/isort), [black](https://github.com/psf/black), [flake518](https://github.com/carstencodes/flake518), [darglint](https://github.com/terrencepreilly/darglint)
* 🅿️ Easy development with [pre-commit hooks](https://pre-commit.com/)
* ✅ Tests with [pytest](https://docs.pytest.org/) and coverage without external tools
* :octocat: CI with [Github actions](https://github.com/features/actions)
Expand Down
12 changes: 6 additions & 6 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ black .
You can modify the configuration of `black` in `pyproject.toml`, under the section `[tool.black]`.


### `pflake8`
### `flake518`

[`flake8`](https://github.com/PyCQA/flake8) is another code formatter, with additional checks, such as code complexity.

[`pflake8`](https://github.com/csachs/pyproject-flake8) is just a small wrapper around `flake8`, that allows to manage its configuration from a `pyproject` configuration file (so we have a single configuration file for all tools).
[`flake518`](https://github.com/carstencodes/flake518) is just a small wrapper around `flake8`, that allows to manage its configuration from a `pyproject` configuration file (so we have a single configuration file for all tools).

You can run `pflake8` manually by running :
You can run `flake518` manually by running :

```bash
pflake8 .
flake518 .
```

!!! note "Where to modify it ?"
You can modify the configuration of `pflake8` in `pyproject.toml`, under the section `[tool.flake8]`.
You can modify the configuration of `flake518` in `pyproject.toml`, under the section `[tool.flake8]`.

### `darglint`

Expand Down Expand Up @@ -114,7 +114,7 @@ Several pre-commit hooks are used in this template repository :
* Ensure no large files are added
* Lint code with `isort`
* Lint code with `black`
* Lint code with `pflake8`
* Lint code with `flake518`
* Lint code with `darglint`
* Ensure unit-tests pass
* Ensure the coverage badge is up-to-date
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ profile = "black"
max-line-length = 119
max-complexity = 10
per-file-ignores = "__init__.py:F401"
extend-ignore = "E203"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
extras_require = {
"test": ["pytest~=7.0", "pytest-cov~=3.0", "coverage-badge~=1.0"],
"hook": ["pre-commit~=2.15"],
"lint": ["isort~=5.9", "black~=23.0", "pyproject-flake8~=0.0.1a2", "darglint~=1.8"],
"lint": ["isort~=5.9", "black~=22.1", "flake518~=1.2", "darglint~=1.8"],
"docs": ["mkdocs-material~=8.1", "mkdocstrings~=0.16", "mike~=1.1"],
}
extras_require["all"] = sum(extras_require.values(), [])
Expand All @@ -37,7 +37,7 @@

setuptools.setup(
name="pytere",
version="1.0.0.dev0",
version="0.3.0",
author="Nicolas REMOND",
author_email="[email protected]",
description="A Python Template Repository",
Expand Down

0 comments on commit fb90888

Please sign in to comment.