Commit a6dad4a9 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

python.md: Add info about YAPF and elaborate on pylint

Bug: 846432
Change-Id: Iac715f99198a10409018c208588211252aa53e53
Reviewed-on: https://chromium-review.googlesource.com/c/1352819Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612178}
parent 7f276c9a
...@@ -30,5 +30,27 @@ greater virtue than compliance.) ...@@ -30,5 +30,27 @@ greater virtue than compliance.)
## Tools ## Tools
### pylint
[Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools.html) [Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools.html)
contains a local copy of pylint, appropriately configured. contains a local copy of pylint, appropriately configured.
* Directories need to opt into pylint presumbit checks via:
`input_api.canned_checks.RunPylint()`.
### YAPF
[YAPF](https://github.com/google/yapf) is a Python formatter that can be used via:
```sh
git cl format --python
```
Directories can opt into enforcing YAPF styling by adding `.style.yapf` file
with the following contents:
```
[style]
based_on_style = chromium
```
Entire files can be formatted (rather than just touched lines) via:
```sh
git cl format --python --full
```
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment