Skip to content

Commit 1baf241

Browse files
committed
build(deps): Add back black
ruff doesn't replace black, yet
1 parent 37bcb65 commit 1baf241

File tree

5 files changed

+139
-1
lines changed

5 files changed

+139
-1
lines changed

CHANGES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force
1919

2020
<!-- Maintainers, insert changes / features for the next release here -->
2121

22+
_Maintenance only, no bug fixes, or new features_
23+
24+
### Development
25+
26+
- Add back `black` for formatting
27+
28+
This is still necessary to accompany `ruff`, until it replaces black.
29+
2230
## tmuxp 1.28.0 (2023-05-27)
2331

2432
_Maintenance only, no bug fixes or features_

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ start_docs:
3838
design_docs:
3939
$(MAKE) -C docs design
4040

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

docs/developing.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,36 @@ this will load the `.tmuxp.yaml` in the root of the project.
329329

330330
## Formatting
331331

332+
### black
333+
334+
[black] is used for formatting.
335+
336+
````{tab} Command
337+
338+
poetry:
339+
340+
```console
341+
$ poetry run black .
342+
```
343+
344+
If you setup manually:
345+
346+
```console
347+
$ black .
348+
```
349+
350+
````
351+
352+
````{tab} make
353+
354+
```console
355+
$ make black
356+
```
357+
358+
````
359+
360+
In the future, `ruff` (below) may replace black as formatter.
361+
332362
### ruff
333363

334364
The project uses [ruff] to handles formatting, sorting imports and linting.
@@ -437,6 +467,7 @@ the [gh build site].
437467
[entr]: http://entrproject.org/
438468
[`entr(1)`]: http://entrproject.org/
439469
[ruff]: https://ruff.rs
470+
[black]: https://github.com/psf/black
440471
[mypy]: http://mypy-lang.org/
441472
[github actions]: https://github.com/features/actions
442473
[gh build site]: https://github.com/tmux-python/tmuxp/actions?query=workflow%3Atests

poetry.lock

Lines changed: 95 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ codecov = "*"
8181
coverage = "*"
8282

8383
### Lint ###
84+
black = "*"
8485
ruff = "*"
8586
mypy = "*"
8687
types-colorama = "*"
@@ -107,6 +108,7 @@ docs = [
107108
test = ["pytest", "pytest-rerunfailures", "pytest-mock", "pytest-watcher"]
108109
coverage = ["codecov", "coverage", "pytest-cov"]
109110
lint = [
111+
"black",
110112
"ruff",
111113
"mypy",
112114
"types-colorama",

0 commit comments

Comments
 (0)