Skip to content

Commit 495b2d5

Browse files
authored
Switch to ruff (#44)
1 parent de04e74 commit 495b2d5

6 files changed

Lines changed: 446 additions & 527 deletions

File tree

.flake8

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ updates:
1212
interval: weekly
1313
versioning-strategy: increase-if-necessary
1414
groups:
15-
update-dependencies:
15+
dependencies:
1616
applies-to: version-updates
1717
patterns:
1818
- "*"
@@ -21,7 +21,7 @@ updates:
2121
schedule:
2222
interval: weekly
2323
groups:
24-
update-actions:
24+
github-actions:
2525
applies-to: version-updates
2626
patterns:
2727
- "*"

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ project: # Rename project (run once)
2424

2525
poetry: # Install Poetry
2626
pipx install -f poetry
27-
poetry self add poetry-plugin-shell
2827

2928
venv:
30-
poetry shell
29+
poetry env activate
3130

3231
install: # Install dependencies and project
3332
poetry install
@@ -42,10 +41,9 @@ precommit: # Install pre-commit hooks
4241
pre-commit: precommit
4342

4443
lint:
45-
poetry run black .
46-
poetry run isort .
44+
poetry run ruff format
45+
poetry run ruff check --fix
4746
poetry run pyright .
48-
poetry run flake8 .
4947

5048
coverage:
5149
poetry run coverage run -m pytest .

docs/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
# Python Project Template
1+
# Python Project Template
2+
![Python](https://img.shields.io/badge/python-3.12+-3776AB.svg?logo=python&style=flat-square)
3+
[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-D7FF64.svg?logo=ruff&style=flat-square)](https://docs.astral.sh/ruff)
4+
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](/LICENSE)
5+
26
A Python project template that comes out of the box with configuration for:
37

48
- Packaging and dependency management using [Poetry](https://python-poetry.org)
59
- Command Line Interface (CLI) using [click](https://click.palletsprojects.com)
610
- Testing using [pytest](https://pytest.org)
711
- Code coverage using [coverage](https://coverage.readthedocs.io)
8-
- Fomatting using [black](https://black.readthedocs.io)
9-
- Import sorting using [isort](https://pycqa.github.io/isort)
12+
- Fomatting, import sorting, and linting using [ruff](https://docs.astral.sh/ruff)
1013
- Type checking using [pyright](https://microsoft.github.io/pyright)
11-
- Linting usig [flake8](https://flake8.pycqa.org)
1214
- Pre-commit validations using [pre-commit](https://pre-commit.com)
1315
- Workflow automation using [GitHub Actions](https://github.com/features/actions)
1416
- Automated dependency update using [Dependabot](https://docs.github.com/en/code-security/dependabot)
@@ -161,7 +163,6 @@ make local
161163
│ └── docs.yml # Woukflow to publish documentation
162164
├── .gitignore # Git-ignored file list
163165
├── .pre-commit-config.yaml # Pre-commit configuration file
164-
├── .flake8 # flake8 configuration file
165166
├── .vscode # VS code folder
166167
│ └── settings.json # VS code settings
167168
├── .dockerignore # Docker-ignored file list

0 commit comments

Comments
 (0)