mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-19 23:36:28 +00:00
Add blog post for black
This commit is contained in:
parent
4c807d6976
commit
4640422b61
22
website/blog/2019-07-31-black.md
Normal file
22
website/blog/2019-07-31-black.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
author: Paulus Schoutsen
|
||||
authorURL: https://twitter.com/balloob
|
||||
authorImageURL: /img/profile/paulus.jpg
|
||||
authorTwitter: balloob
|
||||
title: Adopting Black
|
||||
---
|
||||
|
||||
Today we have officially adopted Black. All code has been formatted with Black and all future contributions will be checked to make sure that they are using Black.
|
||||
|
||||
As part of adopting Black, all style checks in flake8 and pylint have been disabled.
|
||||
|
||||
To make sure that all files are Black when you commit your changes, we are using [`pre-commit`](https://pre-commit.com/). The hook is automatically installed for new dev environments (as part of `script/setup`).
|
||||
|
||||
If you have an existing developer installation, please run:
|
||||
|
||||
```
|
||||
pip install pre-commit
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
`pre-commit` does not change your files, but merely confirms that the changed files are formatted by Black. We suggest that you set up your editor to automatically format files with Black when you hit save. Instructions for various editors can be found [here](https://github.com/psf/black#editor-integration).
|
Loading…
x
Reference in New Issue
Block a user