Skip to content

Commit 6a42eb7

Browse files
authored
chore: add preview option to black pre-commit hook and update README (#405)
1 parent 750cf1d commit 6a42eb7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ repos:
99
rev: 23.7.0
1010
hooks:
1111
- id: black
12+
args: [--preview]
1213
- repo: https://github.com/pycqa/isort
1314
rev: 5.12.0
1415
hooks:
1516
- id: isort
1617
name: isort (python)
17-
args: ["--profile", "black"]

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ alembic revision --autogenerate -m "<msg>"
255255

256256
### Pre-commit Hooks
257257

258-
To ensure code quality and consistency, OpenAdapt uses pre-commit hooks. These hooks
258+
To ensure code quality and consistency, OpenAdapt uses pre-commit hooks. These hooks
259259
will be executed automatically before each commit to perform various checks and
260260
validations on your codebase.
261261

@@ -264,12 +264,13 @@ The following pre-commit hooks are used in OpenAdapt:
264264
- [check-yaml](https://github.com/pre-commit/pre-commit-hooks#check-yaml): Validates the syntax and structure of YAML files.
265265
- [end-of-file-fixer](https://github.com/pre-commit/pre-commit-hooks#end-of-file-fixer): Ensures that files end with a newline character.
266266
- [trailing-whitespace](https://github.com/pre-commit/pre-commit-hooks#trailing-whitespace): Detects and removes trailing whitespace at the end of lines.
267+
- [black](https://github.com/psf/black): Formats Python code to adhere to the Black code style.
267268
- [isort](https://github.com/PyCQA/isort): Sorts Python import statements in a consistent and standardized manner.
268269

269270
To set up the pre-commit hooks, follow these steps:
270271

271272
1. Navigate to the root directory of your OpenAdapt repository.
272-
273+
273274
2. Run the following command to install the hooks:
274275

275276
```

0 commit comments

Comments
 (0)