Skip to content

Commit 0294ac5

Browse files
committed
Switched to ruff
1 parent f504d31 commit 0294ac5

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

.flake8

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

CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ checklist are addressed in your PR.
2020

2121
**PR checklist**
2222

23-
* Format code using [black](https://black.readthedocs.io/) with default settings.
23+
* Format code using first [isort](https://pycqa.github.io/isort/)
24+
then [ruff](https://black.readthedocs.io/) with default settings
25+
(`ruff format .`).
2426
Check also section [code style](#code-style) below.
2527
* Your change shall not break existing unit tests.
2628
`pytest` must run without errors.
@@ -38,10 +40,9 @@ checklist are addressed in your PR.
3840
## Code style
3941

4042
The `zappend` code compliant to [PEP-8](https://pep8.org/) except for a line
41-
length of 88 characters as recommended by [black](https://black.readthedocs.io/).
42-
Since black is un-opinionated regarding the order of imports,
43-
we use the following three import blocks separated by an empty
44-
line:
43+
length of 88 characters as used by `ruff format`.
44+
We structure imports using three blocks separated by an empty
45+
line and sort them using `isort` _before_ applying `ruff`:
4546

4647
1. Python standard library imports, e.g., `os`, `typing`, etc
4748
2. 3rd-party imports, e.g., `xarray`, `zarr`, etc

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![codecov](https://codecov.io/gh/bcdev/zappend/graph/badge.svg?token=B3R6bNmAUp)](https://codecov.io/gh/bcdev/zappend)
1010
[![PyPI Version](https://img.shields.io/pypi/v/zappend)](https://pypi.org/project/zappend/)
1111
[![Conda Version](https://anaconda.org/conda-forge/zappend/badges/version.svg)](https://anaconda.org/conda-forge/zappend)
12-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
12+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff)
1313
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/bcdev/zappend/HEAD?labpath=examples%2Fzappend-demo.ipynb)
1414
[![GitHub License](https://img.shields.io/github/license/bcdev/zappend)](https://github.com/bcdev/zappend)
1515

docs/about.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ pytest --cov=zappend tests
4545

4646
### Code Style
4747

48-
`zappend` source code is formatted using the [black](https://black.readthedocs.io/) tool.
48+
`zappend` source code is formatted using the
49+
[ruff](https://github.com/charliermarsh/ruff) tool.
4950

5051
```bash
51-
black zappend
52+
ruff format .
5253
```
5354

5455
### Documentation

0 commit comments

Comments
 (0)