Skip to content

Commit

Permalink
Merge pull request #549 from fedejaure/feature-add-ruff
Browse files Browse the repository at this point in the history
Replace flake/flakeheaven by ruff
  • Loading branch information
fedejaure authored Dec 9, 2023
2 parents 850b95c + e0ca50f commit 7357362
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 549 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,3 @@ modern-python-boilerplate/

# Code editors
.vscode

# Caches
.flakeheaven_cache
19 changes: 7 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-toml
Expand All @@ -13,24 +14,18 @@ repos:
exclude: "^{{cookiecutter.project_name}}/"
- id: end-of-file-fixer
exclude: "^{{cookiecutter.project_name}}/"
- repo: https://github.com/timothycrosley/isort
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
exclude: "^{{cookiecutter.project_name}}/"
- repo: https://github.com/psf/black
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
exclude: "^{{cookiecutter.project_name}}/"
- repo: local
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
hooks:
- id: flakeheaven
name: flakeheaven
description: "`FlakeHeaven` it's a Flake8 wrapper to make it cools."
entry: poetry run flakeheaven
args: [lint]
language: system
types: [python]
require_serial: true
- id: ruff
exclude: "^{{cookiecutter.project_name}}/"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [Unreleased]
### Added
- Ruff `^0.1.7`.

### Changed
- mypy from `^1.7.0` to `^1.7.1`.
- actions/setup-python from `v4.7.1` to `v5.0.0`.

### Removed
- falke8 and flakeheaven.

## [2.3.1] - 2023-11-18
### Changed
- actions/setup-python from `v4.6.1` to `v4.7.1`.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ work, tests, or other changes before your pull request can be ultimately accepte

### Python Code Style

All Python code is linted with [Flake8](https://github.com/PyCQA/flake8) and formated with
All Python code is linted with [Ruff](https://github.com/astral-sh/ruff) and formated with
[Isort](https://github.com/PyCQA/isort) and [Black](https://github.com/psf/black). You can
execute `inv[oke] lint` and `inv[oke] format`.

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Dependency tracking using [Poetry][poetry]
* Testing setup with [Pytest][pytest]
* [Github Actions][github actions] ready for Continuous Integration testing
* Linting provided by [Flake8][flake8] with [flakeheaven][flakeheaven]
* Linting provided by [Ruff][ruff]
* Docstring linting provided by [Darglint][darglint] using the [Google Python Style Guide][google styleguide]
* Static type checking by [Mypy][mypy]
* Formatting provided by [Black][black] and [Isort][isort]
Expand Down Expand Up @@ -77,8 +77,7 @@ This cookiecutter was built for learning purpose and inspired by:
[poetry]: https://python-poetry.org/
[pytest]: https://github.com/pytest-dev/pytest
[github actions]: https://github.com/features/actions
[flake8]: https://gitlab.com/pycqa/flake8
[flakeheaven]: https://github.com/flakeheaven/flakeheaven
[ruff]: https://github.com/astral-sh/ruff
[isort]: https://github.com/timothycrosley/isort
[black]: https://github.com/psf/black
[darglint]: https://github.com/terrencepreilly/darglint
Expand Down
2 changes: 1 addition & 1 deletion docs/invoke.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ Execute `inv[oke] --list` to see the list of available commands.
clean-tests Clean up files from testing.
coverage Create coverage report.
docs Build documentation.
flake8 Run flake8.
format Format code.
hooks Run pre-commit hooks.
install-hooks Install pre-commit hooks.
lint Run all linting.
mypy Run mypy.
ruff Run ruff.
security Run security related checks.
tests Run tests.
version Bump version.
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ You will find one folder named after the ``[project_name]``. Move into this fold
mypackage $ git add .
mypackage $ git commit -m "Initial skeleton."
mypackage $ git remote add origin [email protected]:myusername/mypackage.git
mypackage $ git push -u origin master
mypackage $ git push -u origin main
Where ``myusername`` and ``mypackage`` are adjusted for your username and package name.

Expand Down
Loading

0 comments on commit 7357362

Please sign in to comment.