misc: add black files/notes
This commit is contained in:
parent
ce7f2dd500
commit
8bb319ec8a
|
@ -0,0 +1,2 @@
|
||||||
|
# trivial: apply black
|
||||||
|
ce7f2dd5000cf1eb462ae18aeeb5ab66913b452f
|
|
@ -0,0 +1,8 @@
|
||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 20.8b1
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
|
12
README
12
README
|
@ -36,6 +36,18 @@ Tests
|
||||||
pip install pytest pytest-django pytest-mock
|
pip install pytest pytest-django pytest-mock
|
||||||
DJANGO_SETTINGS_MODULE=welco.settings py.test tests/
|
DJANGO_SETTINGS_MODULE=welco.settings py.test tests/
|
||||||
|
|
||||||
|
|
||||||
|
Code Style
|
||||||
|
----------
|
||||||
|
|
||||||
|
black is used to format the code, using thoses parameters:
|
||||||
|
|
||||||
|
black --target-version py37 --skip-string-normalization --line-length 110
|
||||||
|
|
||||||
|
There is .pre-commit-config.yaml to use pre-commit to automatically run black
|
||||||
|
before commits. (execute `pre-commit install` to install the git hook.)
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue