misc: add black files/notes

This commit is contained in:
Frédéric Péters 2021-01-11 20:03:53 +01:00
parent faa1f97b00
commit 3b51b68b68
3 changed files with 21 additions and 0 deletions

2
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,2 @@
# trivial: apply black
faa1f97b000c9e259edbf45bed4b362fcb7fad8f

8
.pre-commit-config.yaml Normal file
View File

@ -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']

11
README
View File

@ -63,3 +63,14 @@ You can open an upload form to fargo by creating a popup or an iframe with
location http://fargo/upload/. You can pass a parameter ?next=http://yoursite/ location http://fargo/upload/. You can pass a parameter ?next=http://yoursite/
if you want the user to come back to your site after the upload, to close the if you want the user to come back to your site after the upload, to close the
popup or the destroy the iframe. popup or the destroy the iframe.
Code Style
==========
black is used to format the Python 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.)