aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAlex Nicksay <nicksay@google.com>2016-10-17 13:00:14 -0400
committerAlex Nicksay <nicksay@google.com>2016-10-17 13:57:56 -0400
commitb04f4ea185a399369edb484e46a3626cb4c8c4e0 (patch)
treed853f6b14afdcad53378bfd11e52bd234180111a /python
parentd60aa2311664f0ac35b6ed1a10a990658eba4b86 (diff)
downloadbrotli-b04f4ea185a399369edb484e46a3626cb4c8c4e0.zip
brotli-b04f4ea185a399369edb484e46a3626cb4c8c4e0.tar.gz
brotli-b04f4ea185a399369edb484e46a3626cb4c8c4e0.tar.bz2
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.
Diffstat (limited to 'python')
-rw-r--r--python/README.md39
1 files changed, 36 insertions, 3 deletions
diff --git a/python/README.md b/python/README.md
index e787228..5b962d0 100644
--- a/python/README.md
+++ b/python/README.md
@@ -1,5 +1,38 @@
-This directory contains Python brotli wrapper module and roundtrip tests.
+This directory contains the code for the Python `brotli` module,
+`bro.py` tool, and roundtrip tests.
-To build module execute `python setup.py build_ext` from root project directory.
-To test module run `python setup.py test`.
+### 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