Hash :
b04f4ea1
Author :
Date :
2016-10-17T13:00:14
Python: Update README with information about code formatting Also, add a `yapf` section to `setup.cfg` to ensure YAPF runs format code with the Google style.
This directory contains the code for the Python brotli module,
bro.py tool, and roundtrip tests.
To build the module, execute the following from the root project directory:
$ python setup.py build_ext
To test the module, execute the following from the root project directory:
$ python setup.py test
Brotli’s code follows the Google Python Style Guide. To automatically format your code, install YAPF:
$ pip install yapf
Then, either format a single file:
$ yapf --in-place FILE
Or, format all files in a directory:
$ yapf --in-place --recursive DIR
See the YAPF usage documentation for more information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
This directory contains the code for the Python `brotli` module,
`bro.py` tool, and roundtrip tests.
### Development
To build the module, execute the following from the root project
directory:
$ python setup.py build_ext
To test the module, execute the following from the root project
directory:
$ python setup.py test
### Code Style
Brotli's code follows the [Google Python Style Guide][]. To
automatically format your code, install [YAPF][]:
$ pip install yapf
Then, either format a single file:
$ yapf --in-place FILE
Or, format all files in a directory:
$ yapf --in-place --recursive DIR
See the [YAPF usage][] documentation for more information.
[Google Python Style Guide]: https://google.github.io/styleguide/pyguide.html
[YAPF]: https://github.com/google/yapf
[YAPF usage]: https://github.com/google/yapf#usage