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

Use ruff instead of black for formatting #392

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 23.6 (in development)

- Use ruff instead of black for formatting (#392).
- Remove support for Python 3.7 (EOL) (#388).

## 23.5 (2023-06-02)
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![image](https://github.com/zostera/django-marina/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-marina/actions?workflow=CI)
[![Coverage Status](https://coveralls.io/repos/github/zostera/django-marina/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-marina?branch=main)
[![Latest PyPI version](https://img.shields.io/pypi/v/django-marina.svg)](https://pypi.python.org/pypi/django-marina)
[![Any color you like](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

Django extensions by Zostera.

Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ clean = "rm -rf docs/_build"

[tool.hatch.envs.lint]
dependencies = [
"black>=23.3.0",
"ruff>=0.0.270",
"ruff>0.1",
]
detached = true

Expand All @@ -113,19 +112,14 @@ all = [
"style",
]
fmt = [
"black {args:.}",
"ruff --fix {args:.}",
"ruff format {args:.}",
"style",
]
style = [
"ruff {args:.}",
"black --check --diff {args:.}",
]

[tool.black]
line-length = 120
target_version = ["py38", "py39", "py310", "py311"]

[tool.ruff]
fix = false
fixable = [
Expand Down