Skip to content

Commit 230406f

Browse files
committed
build(deps): Add back black
ruff doesn't replace black, yet
1 parent 7c948cd commit 230406f

File tree

5 files changed

+139
-4
lines changed

5 files changed

+139
-4
lines changed

CHANGES

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ $ pip install --user --upgrade --pre libtmux
1414

1515
<!-- Maintainers and contributors: Insert change notes for the next release above -->
1616

17+
_Maintenance only, no bug fixes or features_
18+
19+
### Development
20+
21+
- Add back `black` for formatting
22+
23+
This is still necessary to accompany `ruff`, until it replaces black.
24+
1725
## libtmux 0.22.0 (2023-05-27)
1826

1927
_Maintenance only, no bug fixes or features_

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ serve_docs:
3838
dev_docs:
3939
$(MAKE) -j watch_docs serve_docs
4040

41+
black:
42+
poetry run black `${PY_FILES}`
43+
4144
ruff:
4245
poetry run ruff .
4346

docs/developing.md

+31-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,36 @@ and `setup.cfg`:
6161

6262
## Linting
6363

64+
### black
65+
66+
[black] is used for formatting.
67+
68+
````{tab} Command
69+
70+
poetry:
71+
72+
```console
73+
$ poetry run black .
74+
```
75+
76+
If you setup manually:
77+
78+
```console
79+
$ black .
80+
```
81+
82+
````
83+
84+
````{tab} make
85+
86+
```console
87+
$ make black
88+
```
89+
90+
````
91+
92+
In the future, `ruff` (below) may replace black as formatter.
93+
6494
### ruff
6595

6696
The project uses [ruff] to handles formatting, sorting imports and linting.
@@ -115,8 +145,6 @@ $ ruff . --fix
115145
116146
````
117147

118-
119-
120148
### mypy
121149

122150
[mypy] is used for static type checking.
@@ -215,5 +243,6 @@ Update `__version__` in `__about__.py` and `pyproject.toml`::
215243
[poetry]: https://python-poetry.org/
216244
[entr(1)]: http://eradman.com/entrproject/
217245
[`entr(1)`]: http://eradman.com/entrproject/
246+
[black]: https://github.com/psf/black
218247
[ruff]: https://ruff.rs
219248
[mypy]: http://mypy-lang.org/

poetry.lock

+95-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ coverage = "*"
7575
pytest-cov = "*"
7676

7777
### Format ###
78+
black = "*"
7879
ruff = "*"
7980
mypy = "*"
8081

@@ -94,7 +95,7 @@ docs = [
9495
]
9596
test = ["pytest", "pytest-rerunfailures", "pytest-mock", "pytest-watcher"]
9697
coverage = ["codecov", "coverage", "pytest-cov"]
97-
lint = ["ruff", "mypy"]
98+
lint = ["black", "ruff", "mypy"]
9899

99100
[tool.poetry.plugins.pytest11]
100101
libtmux = "libtmux.pytest_plugin"

0 commit comments

Comments
 (0)